gtk+ r19927 - in branches/gtk-2-12: . gdk/win32



Author: bratsche
Date: Sun Mar 23 15:38:50 2008
New Revision: 19927
URL: http://svn.gnome.org/viewvc/gtk+?rev=19927&view=rev

Log:
2008-03-23  Cody Russell  <bratsche gnome org>

	Merged from trunk:

        * 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)



Modified:
   branches/gtk-2-12/ChangeLog
   branches/gtk-2-12/gdk/win32/gdkevents-win32.c

Modified: branches/gtk-2-12/gdk/win32/gdkevents-win32.c
==============================================================================
--- branches/gtk-2-12/gdk/win32/gdkevents-win32.c	(original)
+++ branches/gtk-2-12/gdk/win32/gdkevents-win32.c	Sun Mar 23 15:38:50 2008
@@ -1305,9 +1305,16 @@
       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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]