gtk+ r21218 - in trunk: . gdk/win32
- From: bratsche svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r21218 - in trunk: . gdk/win32
- Date: Thu, 28 Aug 2008 02:42:23 +0000 (UTC)
Author: bratsche
Date: Thu Aug 28 02:42:23 2008
New Revision: 21218
URL: http://svn.gnome.org/viewvc/gtk+?rev=21218&view=rev
Log:
2008-08-27 Cody Russell <bratsche gnome org>
* gdk/win32/gdkevents-win32.c:
* gdk/win32/gdkwindow-win32.c (show_window_recurse): Check if
the window's state has GDK_WINDOW_STATE_MAXIMIZED set before
calling ShowWindow (), and show using SW_SHOWMAXIMIZED or
SW_RESTORE accordingly. This fixes an issue where maximized
windows that are iconified do not restore back to maximized
when you click the taskbar. (#528975)
Modified:
trunk/ChangeLog
trunk/gdk/win32/gdkevents-win32.c
trunk/gdk/win32/gdkwindow-win32.c
Modified: trunk/gdk/win32/gdkevents-win32.c
==============================================================================
--- trunk/gdk/win32/gdkevents-win32.c (original)
+++ trunk/gdk/win32/gdkevents-win32.c Thu Aug 28 02:42:23 2008
@@ -1304,7 +1304,14 @@
{
if (GDK_WINDOW_OBJECT (window)->state & GDK_WINDOW_STATE_ICONIFIED)
{
- ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
+ if (GDK_WINDOW_OBJECT (window)->state & GDK_WINDOW_STATE_MAXIMIZED)
+ {
+ ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWMAXIMIZED);
+ }
+ else
+ {
+ ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
+ }
}
}
else
@@ -1318,7 +1325,7 @@
}
static void
-show_window_internal (GdkWindow *window, gboolean hide_window)
+do_show_window (GdkWindow *window, gboolean hide_window)
{
GdkWindow *tmp_window = NULL;
GdkWindowImplWin32 *tmp_impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl);
@@ -1339,7 +1346,10 @@
}
/* Recursively show/hide every window in the chain. */
- show_window_recurse (tmp_window, hide_window);
+ if (tmp_window != window)
+ {
+ show_window_recurse (tmp_window, hide_window);
+ }
}
}
@@ -2922,7 +2932,7 @@
{
case SC_MINIMIZE:
case SC_RESTORE:
- show_window_internal (window, msg->wParam == SC_MINIMIZE ? TRUE : FALSE);
+ do_show_window (window, msg->wParam == SC_MINIMIZE ? TRUE : FALSE);
break;
}
@@ -2951,7 +2961,7 @@
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_WITHDRAWN,
GDK_WINDOW_STATE_ICONIFIED);
- show_window_internal (window, TRUE);
+ do_show_window (window, TRUE);
}
else if ((msg->wParam == SIZE_RESTORED ||
msg->wParam == SIZE_MAXIMIZED) &&
@@ -2973,7 +2983,7 @@
if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_TEMP && !GDK_WINDOW_IS_MAPPED (window))
{
- show_window_internal (window, FALSE);
+ do_show_window (window, FALSE);
}
}
else if (msg->wParam == SIZE_MAXIMIZED)
Modified: trunk/gdk/win32/gdkwindow-win32.c
==============================================================================
--- trunk/gdk/win32/gdkwindow-win32.c (original)
+++ trunk/gdk/win32/gdkwindow-win32.c Thu Aug 28 02:42:23 2008
@@ -1106,15 +1106,25 @@
}
if (private->state & GDK_WINDOW_STATE_FULLSCREEN)
- gdk_window_fullscreen (window);
+ {
+ gdk_window_fullscreen (window);
+ }
else if (private->state & GDK_WINDOW_STATE_MAXIMIZED)
- ShowWindow (GDK_WINDOW_HWND (window), SW_MAXIMIZE);
+ {
+ ShowWindow (GDK_WINDOW_HWND (window), SW_MAXIMIZE);
+ }
else if (private->state & GDK_WINDOW_STATE_ICONIFIED)
- ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
+ {
+ ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
+ }
else if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP || !focus_on_map)
- ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNOACTIVATE);
+ {
+ ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNOACTIVATE);
+ }
else
- ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNORMAL);
+ {
+ ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNORMAL);
+ }
if (raise)
{
@@ -1126,17 +1136,25 @@
GDK_WINDOW_TYPE (window) == GDK_WINDOW_DIALOG)
{
if (focus_on_map && private->accept_focus)
- SetForegroundWindow (GDK_WINDOW_HWND (window));
+ {
+ SetForegroundWindow (GDK_WINDOW_HWND (window));
+ }
else
- SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOP,
- 0, 0, 0, 0,
- SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
+ {
+ SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOP,
+ 0, 0, 0, 0,
+ SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
+ }
}
else
- BringWindowToTop (GDK_WINDOW_HWND (window));
+ {
+ BringWindowToTop (GDK_WINDOW_HWND (window));
+ }
}
else if (old_active_window != GDK_WINDOW_HWND (window))
- SetActiveWindow (old_active_window);
+ {
+ SetActiveWindow (old_active_window);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]