Remove the platform-dependent code from Fl_Widget_Surface.cxx - first part.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11445 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
c456dd4eb7
commit
21540390cb
@ -64,11 +64,6 @@ void Fl_Widget_Surface::draw(Fl_Widget* widget, int delta_x, int delta_y)
|
|||||||
// if widget is a main window, clip all drawings to the window area
|
// if widget is a main window, clip all drawings to the window area
|
||||||
if (is_window && !widget->window()) {
|
if (is_window && !widget->window()) {
|
||||||
fl_push_clip(0, 0, widget->w(), widget->h() );
|
fl_push_clip(0, 0, widget->w(), widget->h() );
|
||||||
#ifdef __APPLE__ // for Mac OS X 10.6 and above, make window with rounded bottom corners
|
|
||||||
if ( fl_mac_os_version >= 100600 && driver()->has_feature(Fl_Graphics_Driver::NATIVE) ) {
|
|
||||||
Fl_X::clip_to_rounded_corners((CGContextRef)driver()->gc(), widget->w(), widget->h());
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
// we do some trickery to recognize OpenGL windows and draw them via a plugin
|
// we do some trickery to recognize OpenGL windows and draw them via a plugin
|
||||||
int drawn_by_plugin = 0;
|
int drawn_by_plugin = 0;
|
||||||
@ -159,12 +154,9 @@ void Fl_Widget_Surface::print_window_part(Fl_Window *win, int x, int y, int w, i
|
|||||||
Fl_Window *save_front = Fl::first_window();
|
Fl_Window *save_front = Fl::first_window();
|
||||||
win->show();
|
win->show();
|
||||||
Fl::check();
|
Fl::check();
|
||||||
win->make_current();
|
Fl_X::i(win)->flush(); // makes the window current
|
||||||
uchar *image_data;
|
uchar *image_data;
|
||||||
image_data = fl_read_image(NULL, x, y, w, h);
|
image_data = fl_read_image(NULL, x, y, w, h);
|
||||||
#ifdef __APPLE__ // PORTME: Fl_Surface_Driver - platform paged device
|
|
||||||
Fl_X::q_release_context(); // matches make_current() call above
|
|
||||||
#endif
|
|
||||||
if (save_front != win) save_front->show();
|
if (save_front != win) save_front->show();
|
||||||
current->set_current();
|
current->set_current();
|
||||||
fl_draw_image(image_data, delta_x, delta_y, w, h, 3);
|
fl_draw_image(image_data, delta_x, delta_y, w, h, 3);
|
||||||
|
@ -107,6 +107,10 @@ void Fl_Cocoa_Window_Driver::draw_begin()
|
|||||||
CGContextSaveGState(gc);
|
CGContextSaveGState(gc);
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
if ( fl_mac_os_version >= 100600 ) {
|
||||||
|
// for Mac OS X 10.6 and above, make window with rounded bottom corners
|
||||||
|
Fl_X::clip_to_rounded_corners(gc, pWindow->w(), pWindow->h());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user