gtk+ r19477 - in trunk: . gdk/win32



Author: bratsche
Date: Tue Feb  5 23:46:35 2008
New Revision: 19477
URL: http://svn.gnome.org/viewvc/gtk+?rev=19477&view=rev

Log:
2008-02-05  Cody Russell  <bratsche gnome org>

        * gdk/win32/gdkwindow-win32.c (_gdk_modal_current): Walk
        down the stack until we get to a window that is mapped.
        Otherwise hiding a window will cause all windows in the app
        to be blocked. (#514643)



Modified:
   trunk/ChangeLog
   trunk/gdk/win32/gdkwindow-win32.c

Modified: trunk/gdk/win32/gdkwindow-win32.c
==============================================================================
--- trunk/gdk/win32/gdkwindow-win32.c	(original)
+++ trunk/gdk/win32/gdkwindow-win32.c	Tue Feb  5 23:46:35 2008
@@ -2064,7 +2064,21 @@
 GdkWindow *
 _gdk_modal_current ()
 {
-  return modal_window_stack != NULL ? modal_window_stack->data : NULL;
+  if (modal_window_stack != NULL)
+    {
+      GSList *tmp = modal_window_stack;
+
+      while (tmp != NULL && !GDK_WINDOW_IS_MAPPED (tmp->data))
+	{
+	  tmp = g_slist_next (tmp);
+	}
+
+      return tmp != NULL ? tmp->data : NULL;
+    }
+  else
+    {
+      return NULL;
+    }
 }
 
 void



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