[PATCH 1/2] winex11.drv: Activate window when restoring.
Zhiyi Zhang
zzhang at codeweavers.com
Wed May 15 04:36:35 CDT 2019
Some games, e.g., Mirror's Edge waits for WM_ACTIVATE
when restoring from iconic state. Without this,
the game remains black screen. Windows sends WM_ACTIVATE
when you click on the taskbar to restore windows.
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..a75bc61b60 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -1255,6 +1255,7 @@ static void handle_wm_state_notify( HWND hwnd, XPropertyEvent *event, BOOL updat
{
TRACE( "restoring to max %p/%lx\n", data->hwnd, data->whole_window );
release_win_data( data );
+ SetActiveWindow( hwnd );
SendMessageW( hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0 );
return;
}
@@ -1266,6 +1267,7 @@ 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 );
+ SetActiveWindow( hwnd );
SendMessageW( hwnd, WM_SYSCOMMAND, SC_RESTORE, 0 );
return;
}
--
2.20.1
More information about the wine-devel
mailing list