-- v3: winex11: Update Virtual Desktop fullscreen WM state after setting window pos. winex11: Set MWM_FUNC_RESIZE for fullscreen desktop windows. Revert "winex11: Use the correct root window for virtual desktops."
From: Gabriel Ivăncescu gabrielopcode@gmail.com
This reverts commit 790133e95036597092443b30c0fe0aa6a40a9167.
It was incorrect, sorry about that. The issue was weirder in a different place (MWM_FUNC_RESIZE not set before setting fullscreen).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56149 --- dlls/winex11.drv/desktop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c index fcb6ba2faf5..687c0cf5a4c 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c @@ -107,7 +107,7 @@ static void update_desktop_fullscreen( unsigned int width, unsigned int height) if (!display || !is_virtual_desktop()) return;
xev.xclient.type = ClientMessage; - xev.xclient.window = DefaultRootWindow(display); + xev.xclient.window = root_window; xev.xclient.message_type = x11drv_atom(_NET_WM_STATE); xev.xclient.serial = 0; xev.xclient.display = display;
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Same workaround as used in is_window_resizable, except it's on a different code path. This also affects other WMs (e.g. Kwin, compiz).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56149 Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/winex11.drv/window.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 51125065958..f5f2dd03662 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -747,9 +747,13 @@ static void set_mwm_hints( struct x11drv_win_data *data, UINT style, UINT ex_sty
if (data->hwnd == NtUserGetDesktopWindow()) { - if (is_desktop_fullscreen()) mwm_hints.decorations = 0; - else mwm_hints.decorations = MWM_DECOR_TITLE | MWM_DECOR_BORDER | MWM_DECOR_MENU | MWM_DECOR_MINIMIZE; mwm_hints.functions = MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE | MWM_FUNC_CLOSE; + if (is_desktop_fullscreen()) + { + mwm_hints.decorations = 0; + mwm_hints.functions |= MWM_FUNC_RESIZE; /* some WMs need this to make it fullscreen */ + } + else mwm_hints.decorations = MWM_DECOR_TITLE | MWM_DECOR_BORDER | MWM_DECOR_MENU | MWM_DECOR_MINIMIZE; } else {
From: Gabriel Ivăncescu gabrielopcode@gmail.com
To make sure the hints are set up properly first.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56149 Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/winex11.drv/desktop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c index 687c0cf5a4c..5867f9d16a4 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c @@ -149,10 +149,10 @@ void X11DRV_resize_desktop(void) height = primary_rect.bottom;
TRACE( "desktop %p change to (%dx%d)\n", hwnd, width, height ); - update_desktop_fullscreen( width, height ); NtUserSetWindowPos( hwnd, 0, virtual_rect.left, virtual_rect.top, virtual_rect.right - virtual_rect.left, virtual_rect.bottom - virtual_rect.top, SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE ); + update_desktop_fullscreen( width, height );
if (old_virtual_rect.left != virtual_rect.left || old_virtual_rect.top != virtual_rect.top) send_message_timeout( HWND_BROADCAST, WM_X11DRV_DESKTOP_RESIZED, old_virtual_rect.left,
On Tue Jan 9 17:47:52 2024 +0000, Rémi Bernon wrote:
I think it'd be clearer to use git revert and its auto commit message? You can add some additional notes to it then but otherwise it's a plain revert. I'm not sure the comment is really worth it, I got confused in the original MR because I mixed up target window vs sent window but that's just my fault, and I'm not sure the comment really helps. We don't have comments for other root_window uses, so IMO it misleadingly makes this one special.
Sure, done. Sorry, it's my first revert, wasn't sure how to proceed with it.
This merge request was approved by Rémi Bernon.