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().
From: Aida Jonikienė aidas957@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
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)
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.