]> Pileus Git - ~andy/gtk/commitdiff
Check that the window is mapped before setting SW_RESTORE or SW_MINIMIZE.
authorCody Russell <bratsche@gnome.org>
Sun, 23 Dec 2007 21:14:09 +0000 (21:14 +0000)
committerCody Russell <bratsche@src.gnome.org>
Sun, 23 Dec 2007 21:14:09 +0000 (21:14 +0000)
2007-12-23  Cody Russell  <bratsche@gnome.org>

        * gdk/win32/gdkevents-win32.c (show_window_recurse): Check that
        the window is mapped before setting SW_RESTORE or SW_MINIMIZE.
        Fixes a regression caused by #164537 patch where transient
        windows that are hidden get shown (incorrectly) when their
        parents are minimized. (#504984)

svn path=/trunk/; revision=19231

ChangeLog
gdk/win32/gdkevents-win32.c

index c57697af4e7e5042741846945fef44a0c4f02c4a..a84350f2292a2cddfedfa0b585289f954895e239 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-12-23  Cody Russell  <bratsche@gnome.org>
+
+       * gdk/win32/gdkevents-win32.c (show_window_recurse): Check that
+       the window is mapped before setting SW_RESTORE or SW_MINIMIZE.
+       Fixes a regression caused by #164537 patch where transient
+       windows that are hidden get shown (incorrectly) when their
+       parents are minimized. (#504984)
+       
 2007-12-22  Christian Persch  <chpe@gnome.org>
 
        * modules/other/gail/gailcell.c:
index 3bf526da150cc2fb8ac837a9e7858da37ed0621f..a916228418a8f4780d1e86e7689fecaa0e82a238 100644 (file)
@@ -1288,10 +1288,13 @@ show_window_recurse (GdkWindow *window, gboolean hide_window)
            }
        }
 
-      if (!hide_window)
-       ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
-      else
-       ShowWindow (GDK_WINDOW_HWND (window), SW_MINIMIZE);
+      if (GDK_WINDOW_IS_MAPPED (window))
+       {
+         if (!hide_window)
+           ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
+         else
+           ShowWindow (GDK_WINDOW_HWND (window), SW_MINIMIZE);
+       }
 
       impl->changing_state = FALSE;
     }