http://bugs.winehq.org/show_bug.cgi?id=19822
Summary: Focus changes in a virtual desktop when leaving it - regression running WoW Product: Wine Version: 1.1.27 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winex11.drv AssignedTo: wine-bugs@winehq.org ReportedBy: paulc@voip.null.ro
The bug was reported by Fabio Capela on wine-devel.
It affects my WoW play in a virtual desktop too (Mandriva 2007.1 x86_64 but probably not relevant).
Direct copy/paste from Fabio Capela's mail providin more details:
I use Wine mostly to play World of Warcraft and I've had a regression in World of Warcraft (when running fullscreen inside a virtual desktop and using the opengl renderer) with patches from the last two weeks:
- Patch 12d1ff8ef6c34533a20008f4cfeb73ee4c601a5d (winex11: Add handling of take focus event on the desktop window.) makes the fullscreen WoW inside the virtual desktop window lose focus when the mouse cursor returns to the virtual desktop window; as a consequence, WoW will minimize inside the virtual desktop whenever the mouse cursor leaves and then returns to the virtual desktop window. For some reason this does not happen if I use the DirectX renderer, only with the OpenGL one.
- When the previous patch is reversed, patch e3720c2810dda3895d6734c55117b0a355223b1a (winex11: Use the Globally Active focus model with take focus.) makes the virtual desktop window unable to receive keyboard focus unless it is the only open window, and even then it's decoration will behave as if it hadn't focus. Mouse works fine.
This is happening with the current vanilla git; with both above patches reversed the problem disappear.
Not sure if this is important, but I'm using Kubuntu 9.04 with KDE 4.3 from the backports repository.
http://bugs.winehq.org/show_bug.cgi?id=19822
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Summary|Focus changes in a virtual |WoW looses focus in a |desktop when leaving it - |virtual desktop when |regression running WoW |leaving it
http://bugs.winehq.org/show_bug.cgi?id=19822
--- Comment #1 from Jeff Zaroyko jeffz@jeffz.name 2009-08-23 14:30:56 --- Also affects other fullscreen applications, Left 4 Dead, Battlefield 1942, Jedi Knight: Dark Forces II.
http://bugs.winehq.org/show_bug.cgi?id=19822
Fábio Capela fabio.capela@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fabio.capela@yahoo.com
--- Comment #2 from Fábio Capela fabio.capela@yahoo.com 2009-08-24 10:15:42 --- Just a clarification, WoW minimizes when the virtual desktop window gets back the focus, not when it loses it.
Which, BTW, means that this behavior can not be the intended one - if the intended behavior was for the fullscreen app to perceive when it loses focus, it should minimize when the virtual desktop loses focus, not when it regains the focus.
http://bugs.winehq.org/show_bug.cgi?id=19822
--- Comment #3 from Fábio Capela fabio.capela@yahoo.com 2009-08-24 11:05:04 --- Created an attachment (id=23238) --> (http://bugs.winehq.org/attachment.cgi?id=23238) event traces when the virtual desktop regains focus
Here are traces from latest git version for the three scenarios (patches reversed, vanilla git with directx renderer, and vanilla git with opengl renderer), tracking the event channel.
http://bugs.winehq.org/show_bug.cgi?id=19822
Rob Earl rob.earl@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rob.earl@gmail.com
--- Comment #4 from Rob Earl rob.earl@gmail.com 2009-08-25 17:47:18 --- This change stops me using a virtual desktop to prevent full screen apps (Dungeons and Dragons Online and Perfect World) minimizing themselves when mousing between X displays.
Perfect World crashes when it regains focus/minimizes. Once DDO is restored it doesn't have focus (can't type/move/click anything). Alt-tabbing away from the virtual desktop and back minimizes the game again then after restoring once more focus is regained.
http://bugs.winehq.org/show_bug.cgi?id=19822
--- Comment #5 from Fábio Capela fabio.capela@yahoo.com 2009-08-26 09:47:37 --- For those of you that are able to compile Wine from the git repository, it might be helpful to try reversing the patches and post your results here, at least to see if your problems are caused by the same set of patches.
The reversing part can be done from the root folder of a git repository with the following command: git diff 12d1ff8ef6c34533a20008f4cfeb73ee4c601a5d~1..12d1ff8ef6c34533a20008f4cfeb73ee4c601a5d | patch -p1 -R && git diff e3720c2810dda3895d6734c55117b0a355223b1a~1..e3720c2810dda3895d6734c55117b0a355223b1a | patch -p1 -R (it is just one line, in case the comment breaks it apart.)
For help in getting wine to compile from git, I recommend the start of the article on regression testing: http://wiki.winehq.org/RegressionTesting
BTW, I've noticed that the virtual desktop will reset its size whenever the fullscreen app minimizes, and if the default size and the resolution asked by the fullscreen app are different it will first go to the default size and then back to the size the app asks whenever the app minimizes (which, again, is strange; if it was mimicking windows it should stay at the default size, only returning to the size asked by the app when the app is maximized again).
http://bugs.winehq.org/show_bug.cgi?id=19822
Julian Rüger jr98@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jr98@gmx.net
http://bugs.winehq.org/show_bug.cgi?id=19822
--- Comment #6 from Rob Earl rob.earl@gmail.com 2009-08-26 18:47:41 --- Perfect World wasn't actually crashing, it was going off screen as in bug 10142.
After reversing those two patches DDO (didn't try PW yet) behaves as it did before:
Without virtual desktop: Game minimizes to bottom left when mouse leaves screen/focus is lost and can be restored by double clicking (normal windows behaviour?).
Without virtual desktop with "Allow the window manager to control the windows": Game minimizes to top left leaving a "dead" game screen (screenshot here: http://img241.imageshack.us/i/ddocrashkb9.png/ ). Game can be restored by double clicking top left, mousing off and back on then double clicking top left again. Simply double clicking results in an unresponsive but active game screen.
With virtual desktop: Game acts as if it never loses focus, stays full screen, doesn't lose interactivity (ideal for dual screen setup).
I'm curious though, should "Allow the window manager to control the windows" block this sort of undesirable behaviour? Using a virtual desktop does/did work but always seemed more like a workaround than a fix to me.
http://bugs.winehq.org/show_bug.cgi?id=19822
Rob Earl rob.earl@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #7 from Rob Earl rob.earl@gmail.com 2009-08-26 18:49:01 --- *** This bug has been confirmed by popular vote. ***
http://bugs.winehq.org/show_bug.cgi?id=19822
Jeff Zaroyko jeffz@jeffz.name changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |julliard@codeweavers.com Summary|WoW looses focus in a |many fullscreen apps loose |virtual desktop when |focus in a virtual desktop |leaving it |when leaving it
--- Comment #8 from Jeff Zaroyko jeffz@jeffz.name 2009-08-27 03:03:22 --- adding author of patch cc, revising summary.
http://bugs.winehq.org/show_bug.cgi?id=19822
--- Comment #9 from Fábio Capela fabio.capela@yahoo.com 2009-08-27 16:36:01 --- (In reply to comment #6)
After reversing those two patches DDO (didn't try PW yet) behaves as it did before:
Without virtual desktop: Game minimizes to bottom left when mouse leaves screen/focus is lost and can be restored by double clicking (normal windows behaviour?).
Yeah, you are getting the normal windows behavior in this scenario :)
I had not tested WoW without the virtual desktop; after testing, I found it behaving way differently than what you found (this on a Kubuntu 9.04, NVidia 7600 with 185.18.14 drivers, and two monitors with twinview).
Without the virtual desktop, using the opengl renderer, WoW will open a window on just one of my monitors, but distorted as if it is trying to cram my whole 2-monitor desktop into one om my monitors; this window will not minimize by itself, but is also not able to get the keyboard focus at all.
With the directx renderer the window is stretched across both monitors, as if Wine is not aware at all about the multiple monitors, and additionally I don't seem to be able to change windows; when I try to change to other windows or even other desktops the 3D image on the background of the login window will vanish, leaving the 2D UI, and the UI continues to work.
It does not matter if the patches are reversed or not.
Without virtual desktop with "Allow the window manager to control the windows": Game minimizes to top left leaving a "dead" game screen (screenshot here: http://img241.imageshack.us/i/ddocrashkb9.png/ ). Game can be restored by double clicking top left, mousing off and back on then double clicking top left again. Simply double clicking results in an unresponsive but active game screen.
With "Allow the window manager to control the windows" enabled and the OpenGL renderer, WoW opens a window similar in appearance to the one in the last case, but the window will minimize as soon as it loses focus, and when the window is maximized again the image will not be distorted anymore, but will be shifted to the right, as if it was still trying to show my whole 2-monitor desktop on a single monitor, but this time by just showing what fits the monitor instead of cramming the whole image.
With the DirectX renderer WoW just crashes.
Again, it does not matter if the patches are reversed or not.
In other words, WoW in fullscreen in a twinview configuration is quite broken for me in the current git version; it either minimizes, cant grab keyboard focus, gets distorted, or simply crashes, no matter if using the virtual desktop or not, having either wine or the WM control the window, or the game renderer used, with the exception of using the DirectX renderer with a virtual desktop.
http://bugs.winehq.org/show_bug.cgi?id=19822
--- Comment #10 from Rob Earl rob.earl@gmail.com 2009-08-27 18:23:44 --- (In reply to comment #6)
Without virtual desktop with "Allow the window manager to control the windows": Game minimizes to top left leaving a "dead" game screen (screenshot here: http://img241.imageshack.us/i/ddocrashkb9.png/ ). Game can be restored by double clicking top left, mousing off and back on then double clicking top left again. Simply double clicking results in an unresponsive but active game screen.
This doesn't happen using Fluxbox. With or without "Allow the window manager to control the windows" the game minimizes to the bottom left and restores just the same.
I don't think these patches are causing any of the problems I'm seeing, they just removed the workaround I was using.
Aside from the game minimizing when focus is regained instead of when lost it's behaving pretty much as it would in windows, it just happens I don't want it to behave like that so need some way to override it.
http://bugs.winehq.org/show_bug.cgi?id=19822
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |michael@araneidae.co.uk
--- Comment #11 from Vitaliy Margolen vitaliy@kievinfo.com 2009-08-28 18:57:20 --- *** Bug 19874 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=19822
--- Comment #12 from Paul Chitescu paulc@voip.null.ro 2009-08-30 08:53:24 --- Proposed new behavior:
- Leave untouched the focus of windows in a virtual desktop even if the desktop itself loses focus. - When a virtual desktop is minimized if a window in it has focus make it lose it. Fullscreen applications will probably minimize, resize the desktop to the startup size and release much of the resources used (WoW stops rendering which is great). - When a virtual desktop is restored if it contains a single minimized visible window post it a WM_SYSCOMMAND SC_RESTORE so from an user perspective everything will be fine.
I'm not sure if or how hackish these can be implemented but it will surely save a lot of trouble.
http://bugs.winehq.org/show_bug.cgi?id=19822
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #13 from Alexandre Julliard julliard@winehq.org 2009-09-02 11:40:33 --- Should be fixed by 6eabce171e8fa0ff67664319de4e755fd84b2fc0.
http://bugs.winehq.org/show_bug.cgi?id=19822
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Alexandre Julliard julliard@winehq.org 2009-09-02 14:30:42 --- Closing bugs fixed in 1.1.29.