]> Pileus Git - ~andy/gtk/commitdiff
Walk down the stack until we get to a window that is mapped. Otherwise
authorCody Russell <bratsche@gnome.org>
Tue, 5 Feb 2008 23:46:35 +0000 (23:46 +0000)
committerCody Russell <bratsche@src.gnome.org>
Tue, 5 Feb 2008 23:46:35 +0000 (23:46 +0000)
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)

svn path=/trunk/; revision=19477

ChangeLog
gdk/win32/gdkwindow-win32.c

index b2154eadf6599468777d9cdbbf182d48384f4ee3..1cee4be6fc7a324f1b89c499af66e4044fb5804d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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)
+
 2008-02-05  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/updateiconcache.c: Ignore images in the toplevel theme
index b81357643e4051345ea137fdd246d0a42ca79315..0bcaeba22cccc99b366b0e37fc7c850ca118978a 100644 (file)
@@ -2064,7 +2064,21 @@ _gdk_remove_modal_window (GdkWindow *window)
 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