summaryrefslogtreecommitdiff
path: root/src/Fl_Double_Window.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2005-09-12 23:03:34 +0000
committerMatthias Melcher <fltk@matthiasm.com>2005-09-12 23:03:34 +0000
commit2b6586f64d4c49a3a3858ce52182610d5b77fbd0 (patch)
treee11963920650a6269ad6c911b026f39ecc4024ec /src/Fl_Double_Window.cxx
parent55380298b5cda84acb862ef5b87023d8f6b51232 (diff)
STR #1007: Applied second patch by hand. OP: could you please check if all changes were made correctly? Thanks!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4563 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Double_Window.cxx')
-rw-r--r--src/Fl_Double_Window.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx
index c0d5c005d..add438801 100644
--- a/src/Fl_Double_Window.cxx
+++ b/src/Fl_Double_Window.cxx
@@ -89,8 +89,10 @@ HDC fl_makeDC(HBITMAP bitmap) {
void fl_copy_offscreen(int x,int y,int w,int h,HBITMAP bitmap,int srcx,int srcy) {
HDC new_gc = CreateCompatibleDC(fl_gc);
+ int save = SaveDC(new_gc);
SelectObject(new_gc, bitmap);
BitBlt(fl_gc, x, y, w, h, new_gc, srcx, srcy, SRCCOPY);
+ RestoreDC(new_gc, save);
DeleteDC(new_gc);
}
@@ -303,8 +305,10 @@ void Fl_Double_Window::flush(int eraseoverlay) {
#ifdef WIN32
HDC _sgc = fl_gc;
fl_gc = fl_makeDC(myi->other_xid);
+ int save = SaveDC(fl_gc);
fl_restore_clip(); // duplicate region into new gc
draw();
+ RestoreDC(fl_gc, save);
DeleteDC(fl_gc);
fl_gc = _sgc;
#elif defined(__APPLE__)