diff options
| author | Manolo Gouy <Manolo> | 2016-12-07 15:09:52 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-12-07 15:09:52 +0000 |
| commit | 43935dffeb7cb54a97b2a8a610c2e453743c0da9 (patch) | |
| tree | 9f132039b9cf120263bf03965c152ac17853969c /src/Fl_win32.cxx | |
| parent | 0a1eed150a9d9215f70f1e50db2ec555199aee7d (diff) | |
Add static void Fl_Surface_Device::push_current(Fl_Surface_Device *new_current) and pop_current() to set/unset the current drawing surface.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12140 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_win32.cxx')
| -rw-r--r-- | src/Fl_win32.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 3b981ae4b..df6238366 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -2392,9 +2392,8 @@ void Fl_WinAPI_Window_Driver::capture_titlebar_and_borders(Fl_Shared_Image*& top float scaling = 1; RECT r = border_width_title_bar_height(wsides, hbottom, bt, &scaling); int htop = bt + hbottom; - Fl_Surface_Device *previous = Fl_Surface_Device::surface(); Window save_win = fl_window; - Fl_Display_Device::display_device()->set_current(); + Fl_Surface_Device::push_current( Fl_Display_Device::display_device() ); pWindow->show(); Fl::check(); void* save_gc = fl_graphics_driver->gc(); @@ -2417,7 +2416,7 @@ void Fl_WinAPI_Window_Driver::capture_titlebar_and_borders(Fl_Shared_Image*& top ReleaseDC(NULL, (HDC)fl_graphics_driver->gc()); fl_window = save_win; fl_graphics_driver->gc(save_gc); - previous->set_current(); + Fl_Surface_Device::pop_current(); } |
