From 045db5be3819a206dea47058a1ebc2b9ffee1700 Mon Sep 17 00:00:00 2001 From: Cody Russell Date: Sun, 23 Dec 2007 21:14:09 +0000 Subject: [PATCH] Check that the window is mapped before setting SW_RESTORE or SW_MINIMIZE. 2007-12-23 Cody Russell * 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 | 8 ++++++++ gdk/win32/gdkevents-win32.c | 11 +++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c57697af4e..a84350f229 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-12-23 Cody Russell + + * 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 * modules/other/gail/gailcell.c: diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c index 3bf526da15..a916228418 100644 --- a/gdk/win32/gdkevents-win32.c +++ b/gdk/win32/gdkevents-win32.c @@ -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; }