https://bugs.winehq.org/show_bug.cgi?id=55810
Bug ID: 55810 Summary: Finding Nemo (Steam): window borders gone missing (virtual desktop) Product: Wine Version: 8.18 Hardware: x86-64 OS: Linux Status: NEW Keywords: regression Severity: minor Priority: P2 Component: advapi32 Assignee: wine-bugs@winehq.org Reporter: gyebro69@gmail.com CC: z.figura12@gmail.com Regression SHA1: 245bdef5b11c19ccd4e8625b86267ca731badcc0 Distribution: ArchLinux
Finding Nemo uses a fixed 800x600 resolution. When I start the game in virtual desktop mode the window borders are absent. Nothing suspicious can be seen in the terminal output.
Reverting commit 245bdef5b11c19ccd4e8625b86267ca731badcc0 fixes the problem for me.
https://store.steampowered.com/app/331450/DisneyPixar_Finding_Nemo/
wine-8.18-127-g6391b8d5c99 X Server 21.1.8 XFCE 4.18 winecfg -> Desktop Integration -> Theme: <No Theme>
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #1 from Andrey Gusev andrey.goosev@gmail.com --- Steam window doesn't remain its (centered) position.
Unity based games have higher resolution and making lower has no effect. As example VD set to 1440x900 but in game 1680x1050.
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #2 from Zeb Figura z.figura12@gmail.com --- I'm not sure I quite understand what the bug is. I don't immediately see any different behaviour running this program in virtual desktop or not. Can you attach screenshots, please?
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #3 from Béla Gyebrószki gyebro69@gmail.com --- Created attachment 75406 --> https://bugs.winehq.org/attachment.cgi?id=75406 screenshot (comparison)
I haven't realized this before but only the first attempt to launch the game causes the missing window borders. After exiting the game and starting it again from the same Steam client instance, Wine draws the borders correctly. Then exiting Steam and starting a fresh instance reintroduces the problem the 1st time I launch the game. The upper image shows the game window with Wine-8.18, the image below is with current wine-8.19-317-gdfa0c9d28da.
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #4 from Zeb Figura z.figura12@gmail.com --- Wait, so in the broken case the virtual desktop itself is missing its decorations? That's bizarre, I have no idea how that's even possible.
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #5 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Zeb Figura from comment #4)
Wait, so in the broken case the virtual desktop itself is missing its decorations? That's bizarre, I have no idea how that's even possible.
Yes, that's what I was trying to describe with my limited English knowledge :)
Could be a quirk with the window manager I'm using (XFCE).
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #6 from Zeb Figura z.figura12@gmail.com --- (In reply to Béla Gyebrószki from comment #5)
(In reply to Zeb Figura from comment #4)
Wait, so in the broken case the virtual desktop itself is missing its decorations? That's bizarre, I have no idea how that's even possible.
Yes, that's what I was trying to describe with my limited English knowledge :)
Nah, your description makes sense in retrospect, I just would not have assumed that's even possible.
Anyway, I think I managed to have reproduced one of the symptoms Andrey mentioned? Currently, starting Steam in a 800x600 desktop will result in a Steam window larger than the virtual desktop; with 245bdef5b1 reverted it resizes itself to 800x600. I'll investigate the source of that and see if fixing it fixes anything else.
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #7 from Zeb Figura z.figura12@gmail.com --- Created attachment 75411 --> https://bugs.winehq.org/attachment.cgi?id=75411 hack is_virtual_desktop() to always return true
Does the attached hack fix all of the reported symptoms?
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #8 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Zeb Figura from comment #7)
Created attachment 75411 [details] hack is_virtual_desktop() to always return true
Does the attached hack fix all of the reported symptoms?
The hack works for me regarding the issue with Finding Nemo.
https://bugs.winehq.org/show_bug.cgi?id=55810
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|advapi32 |user32 CC| |rbernon@codeweavers.com, | |zzhang@codeweavers.com
--- Comment #9 from Zeb Figura z.figura12@gmail.com --- (In reply to Béla Gyebrószki from comment #8)
(In reply to Zeb Figura from comment #7)
Created attachment 75411 [details] hack is_virtual_desktop() to always return true
Does the attached hack fix all of the reported symptoms?
The hack works for me regarding the issue with Finding Nemo.
Thanks, makes sense.
I think I can kind of handwave where the missing decorations are going. is_virtual_desktop() returns FALSE despite us having a virtual desktop, which causes some parts of Wine to report the actual screen size, and when the virtual desktop is resized to the screen size we remove the decorations so that it's effectively fullscreen. But we're not actually resizing the window, it's just in an inconsistent state.
is_virtual_desktop() returns FALSE because Steam (actually steamwebhelper I think) is creating a new winstation and desktop via CreateWindowStation() / CreateDesktop(). Previously this did not happen, because GetSecurityInfo() failed, avoiding that code path entirely.
I can only assume that the actual rendered UI windows aren't associated with the new desktop (they're not created on the same thread, at least). But creating the desktop triggers GPU reënumeration anyway, and is_virtual_desktop() returns FALSE during that process, and that causes the monitor to report the real size of the screen. This also explains why the Steam window clamps its size to the screen edges previously, but not anymore.
Probably is_virtual_desktop() needs to determine whether the desktop is virtual elsehow. I haven't investigated what the right architecture should be here. CC'ing Rémi and Zhiyi since I think they're familiar with this code and may have immediate opinions; if not I'll keep researching.
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #10 from Zhiyi Zhang zzhang@codeweavers.com ---
is_virtual_desktop() returns FALSE because Steam (actually steamwebhelper I think) is creating a new winstation and desktop via CreateWindowStation() / CreateDesktop(). Previously this did not happen, because GetSecurityInfo() failed, avoiding that code path entirely.
The new winstation and desktop are part of the cef sandbox, which is now working after 99e2fad.
Probably is_virtual_desktop() needs to determine whether the desktop is virtual elsehow.
Yes, probably should just check for the config option value instead.
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #11 from Zeb Figura z.figura12@gmail.com --- (In reply to Zhiyi Zhang from comment #10)
Yes, probably should just check for the config option value instead.
It turns out it's not this simple, because the desktop can also be made virtual by passing "/desktop=xyzzy" to explorer.exe.
I don't see an obvious way to retrieve "the" explorer.exe thread or its desktop, and it's not even clear to me what makes it special?
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #12 from Zhiyi Zhang zzhang@codeweavers.com --- I can take a look later.
https://bugs.winehq.org/show_bug.cgi?id=55810
Zhiyi Zhang zzhang@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |zzhang@codeweavers.com
--- Comment #13 from Zhiyi Zhang zzhang@codeweavers.com --- Looking into this.
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #14 from Zhiyi Zhang zzhang@codeweavers.com --- Created attachment 75820 --> https://bugs.winehq.org/attachment.cgi?id=75820 patch
Please try this patch and see if it fixes the original bug. I can only reproduce the steam window not being centered bug while virtual desktop is on.
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #15 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Zhiyi Zhang from comment #14)
Created attachment 75820 [details] patch
Please try this patch and see if it fixes the original bug. I can only reproduce the steam window not being centered bug while virtual desktop is on.
Applying your patch on 9.0-rc3 seems to fix the problem pretty well, thank you for that.
The problem is that commit 790133e95036597092443b30c0fe0aa6a40a9167 makes all the tests inconclusive when using a VD: sometimes your patch works but most of the times it just results the original problem. I tried with numerous Steam client restarts between the tests. Either commit 790133e95 has some ill side effects when using a VD (at least when running games from Steam client) or your patch needs some refinement. In any case, thanks for your work.
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #16 from Zhiyi Zhang zzhang@codeweavers.com --- (In reply to Béla Gyebrószki from comment #15)
(In reply to Zhiyi Zhang from comment #14)
Created attachment 75820 [details] patch
Please try this patch and see if it fixes the original bug. I can only reproduce the steam window not being centered bug while virtual desktop is on.
Applying your patch on 9.0-rc3 seems to fix the problem pretty well, thank you for that.
The problem is that commit 790133e95036597092443b30c0fe0aa6a40a9167 makes all the tests inconclusive when using a VD: sometimes your patch works but most of the times it just results the original problem. I tried with numerous Steam client restarts between the tests. Either commit 790133e95 has some ill side effects when using a VD (at least when running games from Steam client) or your patch needs some refinement. In any case, thanks for your work.
Please open a bug for that. Thanks.
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #17 from Zhiyi Zhang zzhang@codeweavers.com --- Created attachment 75840 --> https://bugs.winehq.org/attachment.cgi?id=75840 patch v2
Please this new version of the fix. The new fix inherits DF_WINE_CREATE_DESKTOP when creating non-root desktops.
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #18 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Zhiyi Zhang from comment #17)
Created attachment 75840 [details] patch v2
Please this new version of the fix. The new fix inherits DF_WINE_CREATE_DESKTOP when creating non-root desktops.
This patch alone doesn't help. The game still starts without window decorations. I need to apply the patch from bug #56149 too, then it will work: attachment #75832.
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #19 from Zhiyi Zhang zzhang@codeweavers.com --- Created attachment 75856 --> https://bugs.winehq.org/attachment.cgi?id=75856 v3 patch 1/2
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #20 from Zhiyi Zhang zzhang@codeweavers.com --- Created attachment 75857 --> https://bugs.winehq.org/attachment.cgi?id=75857 v3 patch 2/2
Please try these two new patches on top of the latest wine master. Thank you!
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #21 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Zhiyi Zhang from comment #20)
Created attachment 75857 [details] v3 patch 2/2
Please try these two new patches on top of the latest wine master. Thank you!
The patches do work. I just have to revert commit 4054795ff199c3f65612f351a88daf17f56a6db9 for some reason to make them work :)
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #22 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Zhiyi Zhang from comment #20)
Created attachment 75857 [details] v3 patch 2/2
Please try these two new patches on top of the latest wine master. Thank you!
The patches make the problem go away in all the affected games on Steam that I know of. Tested with Wine-9.0. Are you planning to send them upstream at some point? Thanks in advance.
https://bugs.winehq.org/show_bug.cgi?id=55810
--- Comment #23 from Zhiyi Zhang zzhang@codeweavers.com --- (In reply to Béla Gyebrószki from comment #22)
(In reply to Zhiyi Zhang from comment #20)
Created attachment 75857 [details] v3 patch 2/2
Please try these two new patches on top of the latest wine master. Thank you!
The patches make the problem go away in all the affected games on Steam that I know of. Tested with Wine-9.0. Are you planning to send them upstream at some point? Thanks in advance.
Yes. It's https://gitlab.winehq.org/wine/wine/-/merge_requests/4786
https://bugs.winehq.org/show_bug.cgi?id=55810
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |ca97cb87008293f7893a5dd4d08 | |2b50c2cfbfb81
--- Comment #24 from Béla Gyebrószki gyebro69@gmail.com --- Fixed by ca97cb87008293f7893a5dd4d082b50c2cfbfb81
https://bugs.winehq.org/show_bug.cgi?id=55810
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #25 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.3.
https://bugs.winehq.org/show_bug.cgi?id=55810
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |9.0.x
http://bugs.winehq.org/show_bug.cgi?id=55810
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|9.0.x |---
--- Comment #26 from Michael Stefaniuc mstefani@winehq.org --- Removing the 9.0.x milestone from bug fixes included in 9.0.1.