summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorCody Russell <bratsche@gnome.org>2008-02-05 23:46:35 +0000
committerCody Russell <bratsche@src.gnome.org>2008-02-05 23:46:35 +0000
commit275760cd0c95e8e748f64a13240986a61728d3d7 (patch)
tree99ad9c488beb6b1023f9c67f454a101f23a45a97 /gdk
parent4b48969f87e24df3320adb5edfd524af9e2b0230 (diff)
downloadgtk+-275760cd0c95e8e748f64a13240986a61728d3d7.tar.gz
Walk down the stack until we get to a window that is mapped. Otherwise
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
Diffstat (limited to 'gdk')
-rw-r--r--gdk/win32/gdkwindow-win32.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index b81357643e..0bcaeba22c 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -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