From 668dfd109f183ad8c4731f7fb8af39977ea89920 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 4 Feb 2011 23:32:53 +0000 Subject: 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 --- src/Fl_Gl_Device_Plugin.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Fl_Gl_Device_Plugin.cxx') 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 -- cgit v1.2.3