print_gl_window(): it's safer to memorize and restore the value of the fl_window global variable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9909 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
a2d821cc2e
commit
b62d3ae87b
@ -45,6 +45,7 @@ static void print_gl_window(Fl_Gl_Window *glw, int x, int y, int height)
|
||||
const int bytesperpixel = 3;
|
||||
#endif
|
||||
Fl_Surface_Device *save_surface = Fl_Surface_Device::surface();
|
||||
Window save_window = fl_window;
|
||||
fl_gc = NULL;
|
||||
Fl_Display_Device::display_device()->set_current();
|
||||
#ifdef WIN32
|
||||
@ -82,7 +83,8 @@ static void print_gl_window(Fl_Gl_Window *glw, int x, int y, int height)
|
||||
#endif
|
||||
baseAddress);
|
||||
glPopClientAttrib();
|
||||
save_surface->set_current();
|
||||
save_surface->Fl_Surface_Device::set_current();
|
||||
fl_window = save_window;
|
||||
fl_gc = save_gc;
|
||||
#if defined(__APPLE__)
|
||||
// kCGBitmapByteOrder32Host and CGBitmapInfo are supposed to arrive with 10.4
|
||||
|
Loading…
Reference in New Issue
Block a user