[PATCH v4 2/4] winex11.drv: Activate window when restoring from iconic state.

Zhiyi Zhang zzhang at codeweavers.com
Wed Jun 5 04:04:58 CDT 2019


Some games, e.g., Project CARS waits for WM_ACTIVATE
when restoring from iconic state.

Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
 dlls/winex11.drv/event.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index 6054f645c4..5c465aa033 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -1266,6 +1266,8 @@ static void handle_wm_state_notify( HWND hwnd, XPropertyEvent *event, BOOL updat
             {
                 TRACE( "restoring win %p/%lx\n", data->hwnd, data->whole_window );
                 release_win_data( data );
+                if ((style & (WS_MINIMIZE | WS_VISIBLE)) == (WS_MINIMIZE | WS_VISIBLE))
+                    SetActiveWindow( hwnd );
                 SendMessageW( hwnd, WM_SYSCOMMAND, SC_RESTORE, 0 );
                 return;
             }
-- 
2.20.1





More information about the wine-devel mailing list