Module: wine Branch: master Commit: 82c6ec3a32f44e8b3e0cc88b7f10e0c0d7fa1b89 URL: https://source.winehq.org/git/wine.git/?a=commit;h=82c6ec3a32f44e8b3e0cc88b7...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Wed Jun 5 17:04:58 2019 +0800
winex11.drv: Activate window when restoring from iconic state.
Some games, e.g., Project CARS waits for WM_ACTIVATE when restoring from iconic state.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 6054f64..5c465aa 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; }