[gtk+/gtk-2-24-quartz] win32: Fix missed resize exit message



commit 534d66669f6be273a3c4a2e10304583d53921537
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Oct 25 15:34:22 2011 +0200

    win32: Fix missed resize exit message
    
    When you start a window resize or move via the window menu and
    don't actually change anything we're not getting an exitsizemove.
    In order to work around this we also look for WM_CAPTURECHANGED.

 gdk/win32/gdkevents-win32.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index fad9d70..0f18a1e 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -2858,7 +2858,16 @@ gdk_event_translate (MSG  *msg,
 
     case WM_EXITSIZEMOVE:
     case WM_EXITMENULOOP:
-      _gdk_win32_end_modal_call ();
+      if (_modal_operation_in_progress)
+	_gdk_win32_end_modal_call ();
+      break;
+
+    case WM_CAPTURECHANGED:
+      /* Sometimes we don't get WM_EXITSIZEMOVE, for instance when you
+	 select move/size in the menu and then click somewhere without
+	 moving/resizing. We work around this using WM_CAPTURECHANGED. */
+      if (_modal_operation_in_progress)
+	_gdk_win32_end_modal_call ();
       break;
 
     case WM_WINDOWPOSCHANGING:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]