[PATCH v2 0/1] MR6648: winex11: Properly handle minimized windows in update_net_wm_fullscreen_monitors().
This prevents a "Failed to get xinerama fullscreen monitor indices." error when minimizing a fullscreen window. -- v2: winex11: Properly handle minimized windows in update_net_wm_fullscreen_monitors(). 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/window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index f9ef26b22d2..bcfd9639f4d 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1029,7 +1029,8 @@ static void update_net_wm_fullscreen_monitors( struct x11drv_win_data *data ) long monitors[4]; XEvent xev; - if (!(data->net_wm_state & (1 << NET_WM_STATE_FULLSCREEN)) || is_virtual_desktop()) + if (!(data->net_wm_state & (1 << NET_WM_STATE_FULLSCREEN)) || is_virtual_desktop() + || !(NtUserGetWindowLongW( data->hwnd, GWL_STYLE ) & WS_MINIMIZE)) return; /* If the current display device handler cannot detect dynamic device changes, do not use -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6648
On Wed Oct 16 07:37:00 2024 +0000, Aida Jonikienė wrote:
changed this line in [version 2 of the diff](/wine/wine/-/merge_requests/6648/diffs?diff_id=138348&start_sha=fc7e9109767afa1e0db3418c8f3a6f3680f79aa4#35b6ba7144b35009fc4eec2cd2406a686bd139e9_135_135) That does seem to work too (so I made that change instead)
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/6648#note_85093
Zhiyi Zhang (@zhiyi) commented about dlls/winex11.drv/window.c:
long monitors[4]; XEvent xev;
- if (!(data->net_wm_state & (1 << NET_WM_STATE_FULLSCREEN)) || is_virtual_desktop()) + if (!(data->net_wm_state & (1 << NET_WM_STATE_FULLSCREEN)) || is_virtual_desktop() + || !(NtUserGetWindowLongW( data->hwnd, GWL_STYLE ) & WS_MINIMIZE))
Note that this `if` checks for invalid conditions. You should remove the `!` before `(NtUserGetWindowLongW( data->hwnd, GWL_STYLE ) & WS_MINIMIZE)` and remove the extra parentheses as well. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6648#note_85104
participants (2)
-
Aida Jonikienė -
Zhiyi Zhang (@zhiyi)