Alexandre Julliard : winex11: Also check the maximized when restoring a minimized window.
Alexandre Julliard
julliard at winehq.org
Fri Aug 1 05:33:42 CDT 2008
Module: wine
Branch: master
Commit: 4a69797c43166699e7fbe70e6a7de4abd9521af8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4a69797c43166699e7fbe70e6a7de4abd9521af8
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Jul 31 17:12:16 2008 +0200
winex11: Also check the maximized when restoring a minimized window.
---
dlls/winex11.drv/event.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index 94ea163..e431786 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -932,9 +932,17 @@ static void handle_wm_state_notify( struct x11drv_win_data *data, XPropertyEvent
if (data->iconic && data->wm_state == NormalState) /* restore window */
{
- TRACE( "restoring win %p/%lx\n", data->hwnd, data->whole_window );
data->iconic = FALSE;
- SendMessageW( data->hwnd, WM_SYSCOMMAND, SC_RESTORE, 0 );
+ if (is_net_wm_state_maximized( event->display, data ))
+ {
+ TRACE( "restoring to max %p/%lx\n", data->hwnd, data->whole_window );
+ SendMessageW( data->hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0 );
+ }
+ else
+ {
+ TRACE( "restoring win %p/%lx\n", data->hwnd, data->whole_window );
+ SendMessageW( data->hwnd, WM_SYSCOMMAND, SC_RESTORE, 0 );
+ }
}
else if (!data->iconic && data->wm_state == IconicState)
{
More information about the wine-cvs
mailing list