summaryrefslogtreecommitdiff
path: root/src/drivers/X11
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/X11')
-rw-r--r--src/drivers/X11/Fl_X11_Window_Driver.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/drivers/X11/Fl_X11_Window_Driver.cxx b/src/drivers/X11/Fl_X11_Window_Driver.cxx
index 6fc76e325..0f16c7812 100644
--- a/src/drivers/X11/Fl_X11_Window_Driver.cxx
+++ b/src/drivers/X11/Fl_X11_Window_Driver.cxx
@@ -387,8 +387,7 @@ void Fl_X11_Window_Driver::capture_titlebar_and_borders(Fl_Shared_Image*& top, F
top = left = bottom = right = NULL;
if (pWindow->decorated_h() == h()) return;
Window from = fl_window;
- Fl_Surface_Device *previous = Fl_Surface_Device::surface();
- Fl_Display_Device::display_device()->set_current();
+ Fl_Surface_Device::push_current( Fl_Display_Device::display_device() );
pWindow->show();
Fl::check();
pWindow->make_current();
@@ -421,7 +420,7 @@ void Fl_X11_Window_Driver::capture_titlebar_and_borders(Fl_Shared_Image*& top, F
}
}
fl_window = from;
- previous->Fl_Surface_Device::set_current();
+ Fl_Surface_Device::pop_current();
}