[PATCH 0/1] MR6648: winex11: Properly handle minimized windows in xinerama_get_fullscreen_monitors().
This prevents a "Failed to get xinerama fullscreen monitor indices." error when minimizing a fullscreen window. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6648
From: Aida Jonikienė <aidas957(a)gmail.com> This prevents a "Failed to get xinerama fullscreen monitor indices." error when minimizing a fullscreen window. --- dlls/winex11.drv/xinerama.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winex11.drv/xinerama.c b/dlls/winex11.drv/xinerama.c index 1fd170b0e07..257f9052c7e 100644 --- a/dlls/winex11.drv/xinerama.c +++ b/dlls/winex11.drv/xinerama.c @@ -132,7 +132,7 @@ BOOL xinerama_get_fullscreen_monitors( const RECT *rect, long *indices ) INT i; pthread_mutex_lock( &xinerama_mutex ); - if (nb_monitors == 1) + if (nb_monitors == 1 || rect->top == -32000) { memset( indices, 0, sizeof(*indices) * 4 ); ret = TRUE; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6648
The test-linux-32 failures already exist without this MR (so these can be ignored here) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6648#note_84567
Zhiyi Zhang (@zhiyi) commented about dlls/winex11.drv/xinerama.c:
INT i;
pthread_mutex_lock( &xinerama_mutex ); - if (nb_monitors == 1) + if (nb_monitors == 1 || rect->top == -32000)
Does adding a `!(NtUserGetWindowLongW( hwnd, GWL_STYLE ) & WS_MINIMIZE)` check at the start of update_net_wm_fullscreen_monitors() work? If so, I prefer that over checking rect->top against -32000. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6648#note_84902
participants (2)
-
Aida Jonikienė -
Zhiyi Zhang (@zhiyi)