This patch fixes a bug where if using the Wine virtual desktop, changing resolutions in a fullscreen game would cause the systray to be drawn over the game window.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40828 Signed-off-by: Hamish Claxton hamishclaxton@gmail.com --- programs/explorer/systray.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c index 3d36f74e16..781da2dec5 100644 --- a/programs/explorer/systray.c +++ b/programs/explorer/systray.c @@ -780,7 +780,13 @@ static LRESULT WINAPI tray_wndproc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM l
case WM_DISPLAYCHANGE: if (hide_systray || (!nb_displayed && !enable_shell)) do_hide_systray(); - else do_show_systray(); + else { + RECT window; + GetWindowRect( GetForegroundWindow(), &window ); + + if ( !( window.right >= SM_CXSCREEN && window.bottom >= SM_CYSCREEN ) ) + do_show_systray(); + } break;
case WM_TIMER: