Skip to content

Commit

Permalink
STR #1007: removed one superfluous ReleaseDC. All demos are running n…
Browse files Browse the repository at this point in the history
…icely again. I did not see any rendering mistakes.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4569 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Matthias Melcher committed Sep 15, 2005
1 parent 49fb8bc commit 2036009
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions FL/win32.H
Expand Up @@ -123,6 +123,7 @@ typedef HBITMAP Fl_Offscreen;
#define fl_create_offscreen(w, h) CreateCompatibleBitmap(fl_gc, w, h)

extern FL_EXPORT HDC fl_makeDC(HBITMAP);

#define fl_begin_offscreen(b) \
HDC _sgc=fl_gc; Window _sw=fl_window; \
fl_gc=fl_makeDC(b); int _savedc = SaveDC(fl_gc); fl_window=(HWND)b; fl_push_no_clip()
Expand Down
17 changes: 8 additions & 9 deletions src/Fl.cxx
Expand Up @@ -862,11 +862,11 @@ void Fl_Window::hide() {
// Send a message to myself so that I'll get out of the event loop...
PostMessage(ip->xid, WM_APP, 0, 0);
if (ip->private_dc) fl_release_dc(ip->xid, ip->private_dc);
if (ip->xid == fl_window && fl_gc) {
fl_release_dc(fl_window, fl_gc);
fl_window = (HWND)-1;
fl_gc = 0;
}
if (ip->xid == fl_window && fl_gc) {
fl_release_dc(fl_window, fl_gc);
fl_window = (HWND)-1;
fl_gc = 0;
}
#elif defined(__APPLE_QD__)
if ( ip->xid == fl_window )
fl_window = 0;
Expand All @@ -878,7 +878,9 @@ void Fl_Window::hide() {

if (ip->region) XDestroyRegion(ip->region);

#ifdef __APPLE_QD__
#ifdef WIN32
XDestroyWindow(fl_display, ip->xid);
#elif defined(__APPLE_QD__)
if ( !parent() ) // don't destroy shared windows!
{
//+ RemoveTrackingHandler( dndTrackingHandler, ip->xid );
Expand All @@ -896,9 +898,6 @@ void Fl_Window::hide() {
# if USE_XFT
fl_destroy_xft_draw(ip->xid);
# endif
#ifdef WIN32
fl_release_dc(ip->xid, fl_gc);
#endif
XDestroyWindow(fl_display, ip->xid);
#endif

Expand Down

0 comments on commit 2036009

Please sign in to comment.