summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Gl_Device_Plugin.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Fl_Gl_Device_Plugin.cxx b/src/Fl_Gl_Device_Plugin.cxx
index 96c977aca..47d3ada7c 100644
--- a/src/Fl_Gl_Device_Plugin.cxx
+++ b/src/Fl_Gl_Device_Plugin.cxx
@@ -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