Check window state for GDK_WINDOW_STATE_ICONIFIED before doing ShowWindow

2008-03-23  Cody Russell  <bratsche@gnome.org>

        * gdk/win32/gdkevents-win32.c (show_window_recurse):
        Check window state for GDK_WINDOW_STATE_ICONIFIED before doing
        ShowWindow (SW_RESTORE).  This fixes a problem where tearing off
        menus from a maximized window would force the window to restore
        its size. (#518846)


svn path=/trunk/; revision=19926
This commit is contained in:
Cody Russell 2008-03-23 15:37:40 +00:00 committed by Cody Russell
parent f571e582a8
commit ca2987a0f9
2 changed files with 17 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2008-03-23 Cody Russell <bratsche@gnome.org>
* gdk/win32/gdkevents-win32.c (show_window_recurse):
Check window state for GDK_WINDOW_STATE_ICONIFIED before doing
ShowWindow (SW_RESTORE). This fixes a problem where tearing off
menus from a maximized window would force the window to restore
its size. (#518846)
2008-03-23 Johan Dahlin <johan@gnome.org>
* gtk/gtk-builder-convert:

View File

@ -1297,9 +1297,16 @@ show_window_recurse (GdkWindow *window, gboolean hide_window)
if (GDK_WINDOW_IS_MAPPED (window))
{
if (!hide_window)
ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
{
if (GDK_WINDOW_OBJECT (window)->state & GDK_WINDOW_STATE_ICONIFIED)
{
ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
}
}
else
ShowWindow (GDK_WINDOW_HWND (window), SW_MINIMIZE);
{
ShowWindow (GDK_WINDOW_HWND (window), SW_MINIMIZE);
}
}
impl->changing_state = FALSE;