Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58066
-- v2: winex11: Only set NET_WM_STATE_FULLSCREEN for the desktop. winex11: Send _NET_WM_STATE requests to X root window. winex11: Trace XReconfigureWMWindow requests mask.
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winex11.drv/window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index a733d566d4f..5d618738e13 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1297,8 +1297,8 @@ static void window_set_config( struct x11drv_win_data *data, const RECT *new_rec
data->pending_state.rect = *new_rect; data->configure_serial = NextRequest( data->display ); - TRACE( "window %p/%lx, requesting config %s above %u, serial %lu\n", data->hwnd, data->whole_window, - wine_dbgstr_rect(new_rect), above, data->configure_serial ); + TRACE( "window %p/%lx, requesting config %s mask %#x above %u, serial %lu\n", data->hwnd, data->whole_window, + wine_dbgstr_rect(new_rect), mask, above, data->configure_serial ); XReconfigureWMWindow( data->display, data->whole_window, data->vis.screen, mask, &changes ); }
From: Rémi Bernon rbernon@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58066 --- dlls/winex11.drv/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 5d618738e13..d52439c8b69 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1234,7 +1234,7 @@ static void window_set_net_wm_state( struct x11drv_win_data *data, UINT new_stat data->net_wm_state_serial = NextRequest( data->display ); TRACE( "window %p/%lx, requesting _NET_WM_STATE %#x serial %lu\n", data->hwnd, data->whole_window, data->pending_state.net_wm_state, data->net_wm_state_serial ); - XSendEvent( data->display, root_window, False, + XSendEvent( data->display, DefaultRootWindow( data->display ), False, SubstructureRedirectMask | SubstructureNotifyMask, &xev ); } }
From: Rémi Bernon rbernon@codeweavers.com
Several window managers have a troublesome sticky maximized state bit, and it's better not to mess with it when asking for fullscreen window is enough.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58066 --- dlls/winex11.drv/window.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index d52439c8b69..47261734119 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1313,7 +1313,7 @@ static void update_net_wm_states( struct x11drv_win_data *data ) if (!data->managed || data->embedded) return; if (data->whole_window == root_window) { - if (is_virtual_desktop()) window_set_net_wm_state( data, is_desktop_fullscreen() ? fullscreen_mask : 0 ); + if (is_virtual_desktop()) window_set_net_wm_state( data, is_desktop_fullscreen() ? (1 << NET_WM_STATE_FULLSCREEN) : 0 ); return; }
@@ -2414,7 +2414,6 @@ BOOL X11DRV_DestroyNotify( HWND hwnd, XEvent *event ) /* initialize the desktop window id in the desktop manager process */ static BOOL create_desktop_win_data( Window win, HWND hwnd ) { - static const UINT fullscreen_mask = (1 << NET_WM_STATE_MAXIMIZED) | (1 << NET_WM_STATE_FULLSCREEN); struct x11drv_thread_data *thread_data = x11drv_thread_data(); Display *display = thread_data->display; struct x11drv_win_data *data; @@ -2424,7 +2423,7 @@ static BOOL create_desktop_win_data( Window win, HWND hwnd ) window_set_managed( data, TRUE ); NtUserSetProp( data->hwnd, whole_window_prop, (HANDLE)win ); set_initial_wm_hints( display, win ); - if (is_desktop_fullscreen()) window_set_net_wm_state( data, fullscreen_mask ); + if (is_desktop_fullscreen()) window_set_net_wm_state( data, (1 << NET_WM_STATE_FULLSCREEN) ); release_win_data( data ); if (thread_data->clip_window) XReparentWindow( display, thread_data->clip_window, win, 0, 0 ); return TRUE;