https://bugs.winehq.org/show_bug.cgi?id=49800
Bug ID: 49800 Summary: World of Warcraft appears on the wrong monitor when running full screen Product: Wine Version: 5.16 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winex11.drv Assignee: wine-bugs@winehq.org Reporter: brgerst@gmail.com Distribution: ---
Prior to 5.16, World of Warcraft appeared full screen on the primary (right) monitor of a dual monitor setup. On 5.16, it appears on the left monitor and can't be moved back to the right unless set to windowed mode. Reverting commit c5ec1585f6e5211a2b63e3435748210552250534 ("winex11.drv: Always update _NET_WM_STATE in update_net_wm_states().") fixes the problem. The desktop environment is MATE on Fedora 32.
Trace output without the patch reverted: 0024:trace:x11drv:update_net_wm_states setting wm state 0 for window 0x1006a/4000005 to 1 prev 1 0024:trace:x11drv:update_net_wm_states setting wm state 1 for window 0x1006a/4000005 to 0 prev 0 0024:trace:x11drv:update_net_wm_states setting wm state 2 for window 0x1006a/4000005 to 0 prev 0 0024:trace:x11drv:update_net_wm_states setting wm state 3 for window 0x1006a/4000005 to 0 prev 0 0024:trace:x11drv:update_net_wm_states setting wm state 4 for window 0x1006a/4000005 to 0 prev 0
https://bugs.winehq.org/show_bug.cgi?id=49800
Brian Gerst brgerst@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |c5ec1585f6e5211a2b63e343574 | |8210552250534 Distribution|--- |Fedora
https://bugs.winehq.org/show_bug.cgi?id=49800
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zzhang@codeweavers.com Keywords| |regression
https://bugs.winehq.org/show_bug.cgi?id=49800
--- Comment #1 from Brian Gerst brgerst@gmail.com --- Debugging further, the clearing of NET_WM_STATE_MAXIMIZED is what causes the game to switch monitors.
https://bugs.winehq.org/show_bug.cgi?id=49800
--- Comment #2 from Brian Gerst brgerst@gmail.com --- Created attachment 68122 --> https://bugs.winehq.org/attachment.cgi?id=68122 Full x11drv trace
https://bugs.winehq.org/show_bug.cgi?id=49800
Sveinar Søpler cybermax@dexter.no changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |cybermax@dexter.no
--- Comment #3 from Sveinar Søpler cybermax@dexter.no --- This is kind of an ageold problem in that the default "starting point" of any screen would be 0.0 (Top most left).
In a multimonitor setup where the second monitor actually is on the left, sometimes this gets confusing for VM's.
World of Warcraft does not really run fullscreen, cos it uses "borderless windowed".. but to do that some magic happens i guess.
The only fix i can think of is using something like devilspie and "force" the window to pop on the correct monitor... I do not have this problem with Gnome and Ubuntu 18.04, but if i use the wine option "Enable virtual desktop", it will pop on my left monitor instead of my main monitor.
Fixing that commit might fix it for MATE, but might break it for other WM's sadly...
https://bugs.winehq.org/show_bug.cgi?id=49800
--- Comment #4 from Brian Gerst brgerst@gmail.com --- I believe I have found a possible root cause for this. The game allows you to specify which monitor to display to, under System->Graphics->Monitor. On Windows, the choices are Primary/Monitor 1/Monitor 2. On Wine, only Primary/Monitor 1. The x11drv logs do show that Wine detects both monitors, but that information isn't getting relayed correctly to the game. I believe if that is fixed, then I would be able to select Monitor 2 (or it would detect it as the Primary).
https://bugs.winehq.org/show_bug.cgi?id=49800
--- Comment #5 from Zhiyi Zhang zzhang@codeweavers.com --- (In reply to Brian Gerst from comment #4)
I believe I have found a possible root cause for this. The game allows you to specify which monitor to display to, under System->Graphics->Monitor. On Windows, the choices are Primary/Monitor 1/Monitor 2. On Wine, only Primary/Monitor 1. The x11drv logs do show that Wine detects both monitors, but that information isn't getting relayed correctly to the game. I believe if that is fixed, then I would be able to select Monitor 2 (or it would detect it as the Primary).
In that case, could you try the following patch and see if it fix the issue for you?
https://bugs.winehq.org/show_bug.cgi?id=49800
--- Comment #6 from Zhiyi Zhang zzhang@codeweavers.com --- Created attachment 68401 --> https://bugs.winehq.org/attachment.cgi?id=68401 enable multiple display output
https://bugs.winehq.org/show_bug.cgi?id=49800
--- Comment #7 from Brian Gerst brgerst@gmail.com --- The patch did add Monitor 2 to the dropdown list, but changing it didn't move it to the other monitor as I had hoped.
https://bugs.winehq.org/show_bug.cgi?id=49800
--- Comment #8 from Brian Gerst brgerst@gmail.com --- With this patch and c5ec1585 reverted, switching monitors does work. So the patch is good, it just fixes a different problem. Should I file a separate bug for it?
Unfortunately, this means that there still is an issue with the new WM state handling vs. the MATE window manager.
https://bugs.winehq.org/show_bug.cgi?id=49800
--- Comment #9 from Zhiyi Zhang zzhang@codeweavers.com --- (In reply to Brian Gerst from comment #8)
With this patch and c5ec1585 reverted, switching monitors does work. So the patch is good, it just fixes a different problem. Should I file a separate bug for it?
No need. It's already known that wine currently only supprts one display output for wined3d.
Unfortunately, this means that there still is an issue with the new WM state handling vs. the MATE window manager.
Probably there are some window manager specific bugs need to be resolved. Do it work on other WMs?
https://bugs.winehq.org/show_bug.cgi?id=49800
--- Comment #10 from Brian Gerst brgerst@gmail.com --- It does work without the revert on GNOME.
https://bugs.winehq.org/show_bug.cgi?id=49800
--- Comment #11 from Zhiyi Zhang zzhang@codeweavers.com --- Could you try retesting with https://github.com/mate-desktop/marco/pull/679 applied to marco, the MATE window manager?
https://bugs.winehq.org/show_bug.cgi?id=49800
--- Comment #12 from Brian Gerst brgerst@gmail.com --- The change to Marco does allow switching monitors in game, but it still starts up on the wrong monitor (Monitor 2). I also had to disable DXVK to get both monitors enumerated.
https://bugs.winehq.org/show_bug.cgi?id=49800
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fgouget@codeweavers.com Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=49800
Zhiyi Zhang zzhang@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|winex11.drv |-unknown Regression SHA1|c5ec1585f6e5211a2b63e343574 | |8210552250534 | Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Version|5.16 |7.0-rc5 Keywords|patch, regression |
--- Comment #13 from Zhiyi Zhang zzhang@codeweavers.com --- Confirmed with Ubuntu 21.10 MATE, Marco version 1.26. However, this is not a regression from c5ec158. I can reproduce this bug on wine-5.15 as well. I also tried reverting the commit and the bug persists.