gtk+ r20727 - in branches/gtk-2-12: . gdk/win32



Author: bratsche
Date: Tue Jul  1 23:18:59 2008
New Revision: 20727
URL: http://svn.gnome.org/viewvc/gtk+?rev=20727&view=rev

Log:
2008-07-01  Cody Russell  <bratsche gnome org>

	Merged from trunk:

        Bug 539164 â Windows' System Menu blocks main loop

        * gdk/win32/gdkevents-win32.c:	Use a modal timer proc in between
	receiving WM_ENTERMENULOOP and	WM_EXITMENULOOP	and pump	the
	GLib mainloop from there.



Modified:
   branches/gtk-2-12/ChangeLog
   branches/gtk-2-12/gdk/win32/gdkevents-win32.c

Modified: branches/gtk-2-12/gdk/win32/gdkevents-win32.c
==============================================================================
--- branches/gtk-2-12/gdk/win32/gdkevents-win32.c	(original)
+++ branches/gtk-2-12/gdk/win32/gdkevents-win32.c	Tue Jul  1 23:18:59 2008
@@ -139,7 +139,7 @@
 #endif
 
 static gboolean in_ime_composition = FALSE;
-static UINT     resize_timer;
+static UINT     modal_timer;
 
 static int debug_indent = 0;
 
@@ -2038,7 +2038,7 @@
 }
 
 static VOID CALLBACK
-resize_timer_proc (HWND     hwnd,
+modal_timer_proc (HWND     hwnd,
 		   UINT     msg,
 		   UINT     id,
 		   DWORD    time)
@@ -3026,12 +3026,22 @@
 
     case WM_ENTERSIZEMOVE:
       _sizemove_in_progress = TRUE;
-      resize_timer = SetTimer (NULL, 0, 20, resize_timer_proc);
+      modal_timer = SetTimer (NULL, 0, 20, modal_timer_proc);
       break;
 
     case WM_EXITSIZEMOVE:
       _sizemove_in_progress = FALSE;
-      KillTimer (NULL, resize_timer);
+      KillTimer (NULL, modal_timer);
+      break;
+
+    case WM_ENTERMENULOOP:
+      _sizemove_in_progress = TRUE;
+      modal_timer = SetTimer (NULL, 0, 20, modal_timer_proc);
+      break;
+
+    case WM_EXITMENULOOP:
+      _sizemove_in_progress = FALSE;
+      KillTimer (NULL, modal_timer);
       break;
 
     case WM_WINDOWPOSCHANGED :



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