summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-04-25 15:52:53 +0000
committerManolo Gouy <Manolo>2018-04-25 15:52:53 +0000
commit527df2dc7faec8f986632a7146074880e1b8bc5d (patch)
tree6877ba793c58bfa061c52d6107898a8d0a749bdb /src
parente59a06f75328996b2f8277f10983c992239807c2 (diff)
Have Fl_WinAPI_Window_Driver::capture_titlebar_and_borders() restore the window's device context before return
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12870 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_win32.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index c90ecd084..c5fe41acf 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -2680,6 +2680,7 @@ void Fl_WinAPI_Window_Driver::capture_titlebar_and_borders(Fl_Shared_Image *&top
pWindow->show();
while (Fl::ready())
Fl::check();
+ HDC save_gc = (HDC)fl_graphics_driver->gc();
fl_graphics_driver->gc(GetDC(NULL));
int ww = w() * scaling + 2 * wsides;
wsides /= scaling;
@@ -2710,6 +2711,7 @@ void Fl_WinAPI_Window_Driver::capture_titlebar_and_borders(Fl_Shared_Image *&top
}
}
ReleaseDC(NULL, (HDC)fl_graphics_driver->gc());
+ fl_graphics_driver->gc(save_gc);
Fl_Surface_Device::pop_current();
}