diff options
| author | Manolo Gouy <Manolo> | 2013-05-04 21:14:31 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2013-05-04 21:14:31 +0000 |
| commit | b62d3ae87ba5cc4989c18eae06d8fc0662015958 (patch) | |
| tree | 30c928a1e6ac40a8f3caef664b7d3cd5cd6f4793 /src | |
| parent | a2d821cc2e089c3872e881db046efe8ae1c44253 (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Gl_Device_Plugin.cxx | 4 |
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 |
