From 452c17f8fbfe51eaba2eddeda2197db7f0a95ce2 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 14 Feb 2005 13:44:24 +0000 Subject: Fl::wait() could block on WIN32 if the window was deleted via Fl::delete_widget() (STR #679) src/Fl.cxx: - Post an application message when a window is hidden on WIN32. src/Fl_win32.cxx: - Change async select message to WM_APP + 1, and document our use of WM_APP. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4043 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 2 ++ src/Fl.cxx | 2 ++ src/Fl_win32.cxx | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 7c17105aa..239d42191 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ CHANGES IN FLTK 1.1.7 - Documentation fixes (STR #648, STR #692) + - Fl::wait() could block on WIN32 if the window was + deleted via Fl::delete_widget() (STR #679) - Fl_Preferences::RootNode did not find the user's home directory on some non-US versions of Windows (STR #720) diff --git a/src/Fl.cxx b/src/Fl.cxx index dd0ebea81..d90600402 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -829,6 +829,8 @@ void Fl_Window::hide() { handle(FL_HIDE); #ifdef WIN32 + // 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) ReleaseDC(ip->xid,ip->private_dc); if (ip->xid == fl_window && fl_gc) { ReleaseDC(fl_window, fl_gc); diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index f9fb43657..f49c432ca 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_win32.cxx,v 1.33.2.37.2.52 2004/12/03 03:14:16 easysw Exp $" +// "$Id$" // // WIN32-specific code for the Fast Light Tool Kit (FLTK). // @@ -104,7 +104,7 @@ // the sockets has pending data, etc. // -#define WM_FLSELECT (WM_USER+0x0400) +#define WM_FLSELECT (WM_APP+1) // WM_APP is used for hide-window //////////////////////////////////////////////////////////////// @@ -1244,5 +1244,5 @@ void Fl_Window::make_current() { } // -// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.52 2004/12/03 03:14:16 easysw Exp $". +// End of "$Id$". // -- cgit v1.2.3