summaryrefslogtreecommitdiff
path: root/src/Fl_Gl_Device_Plugin.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2011-02-04 23:32:53 +0000
committerManolo Gouy <Manolo>2011-02-04 23:32:53 +0000
commit668dfd109f183ad8c4731f7fb8af39977ea89920 (patch)
treef0f1ef1ca07aeb68c97689537355f1300d4ce511 /src/Fl_Gl_Device_Plugin.cxx
parent31bbbf7ae60f07d5f87454db0be9e27eea676ded (diff)
Fix STR #2535: clipping + coordinate transformations are now managed separately for each
surface device. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8368 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Gl_Device_Plugin.cxx')
-rw-r--r--src/Fl_Gl_Device_Plugin.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Fl_Gl_Device_Plugin.cxx b/src/Fl_Gl_Device_Plugin.cxx
index 135ec78a2..ffb714014 100644
--- a/src/Fl_Gl_Device_Plugin.cxx
+++ b/src/Fl_Gl_Device_Plugin.cxx
@@ -53,7 +53,9 @@ static void print_gl_window(Fl_Gl_Window *glw, int x, int y, int height)
_XGC *save_gc = fl_gc;
const int bytesperpixel = 3;
#endif
+ Fl_Surface_Device *save_surface = Fl_Surface_Device::surface();
fl_gc = NULL;
+ Fl_Display_Device::display_device()->set_current();
#ifdef WIN32
Fl::check();
Fl_Window *win = (Fl_Window*)glw;
@@ -89,6 +91,7 @@ static void print_gl_window(Fl_Gl_Window *glw, int x, int y, int height)
#endif
baseAddress);
glPopClientAttrib();
+ save_surface->set_current();
fl_gc = save_gc;
#if defined(__APPLE__)
// kCGBitmapByteOrder32Host and CGBitmapInfo are supposed to arrive with 10.4