https://bugs.winehq.org/show_bug.cgi?id=37716
Bug ID: 37716 Summary: GTAVC in virtual desktop starts minimized Product: Wine Version: 1.7.32 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: b7.10110111@gmail.com Distribution: ---
After wine upgrade launching GTAVC in wine virtual desktop doesn't show anything on screen of the virtual desktop. I can hear sound from intro video though. In fact, I can click on the GTAVC icon at the bottom-left, then a menu appears, selecting "Restore" in which gives me the game window and allows playing.
Here's the git-bisect result
45d530461bf29c953f5f4532cc0e917b4c4fc296 is the first bad commit commit 45d530461bf29c953f5f4532cc0e917b4c4fc296 Author: Stefan Dösinger stefan@codeweavers.com Date: Thu Nov 13 20:39:25 2014 +0100
wined3d: Minimize device windows on focus loss.
:040000 040000 7711e853d780f4c05cc8ae578ff45462fb9ec7f7 63f0b55f65e85a8895ac0d1ef0ee94dbb5595db6 M dlls
PS: I'm using glib-2.30 with wine, so I can watch/hear the intro videos. I think similar problem would be for those with new glib and disabled wine-gst.
https://bugs.winehq.org/show_bug.cgi?id=37716
Ruslan Kabatsayev b7.10110111@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Regression SHA1| |45d530461bf29c953f5f4532cc0 | |e917b4c4fc296
https://bugs.winehq.org/show_bug.cgi?id=37716
Ruslan Kabatsayev b7.10110111@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=37716
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
--- Comment #1 from Sebastian Lackner sebastian@fds-team.de --- Could you try with 1.7.33 please? This might be similar to https://bugs.winehq.org/show_bug.cgi?id=37658, where a fix was already committed.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #2 from Ruslan Kabatsayev b7.10110111@gmail.com --- (In reply to Sebastian Lackner from comment #1)
Could you try with 1.7.33 please? This might be similar to https://bugs.winehq.org/show_bug.cgi?id=37658, where a fix was already committed.
In fact I caught the problem in 1.7.33 in the first place, and it's the bisect which resulted in a commit between 1.7.31 and 1.7.32, so I set this version in the report. So no, it's definitely not fixed yet.
https://bugs.winehq.org/show_bug.cgi?id=37716
hash HASH.DuOrden@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |HASH.DuOrden@gmail.com
--- Comment #3 from hash HASH.DuOrden@gmail.com --- It appears that same commit is impacting "World of Tanks". It looks like the main problem happens with focus receive/loss. With git wine after "World of Tanks" starts, f I switch to any other window and then back to "World of Tanks", the game looks like its frozen and if I try to input something it doesn't show anything but as soon I look back at that "other" window I can see all the input I tried to input in "World of Tanks". "World of Tanks" have a focus detection and if game detects that it lost the focus it stops receiving any input. So my guess is that with this commit after loosing focus game nether regain it.
I did git-bisect and got the same result as topic starter. As off now this commit doesn't reverse-applies clearly: The Hunk in dlls/wined3d/swapchain.c but that doesn't stop wine from compiling and/or running without this problem.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #4 from Stefan Dösinger stefan@codeweavers.com --- I'm on vacation right now, I'll look at it next week.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #5 from Stefan Dösinger stefan@codeweavers.com --- By the way: Please state which OS and window manager you are using. It shouldn't matter too much for the virtual desktop, but one never knows...
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #6 from Ruslan Kabatsayev b7.10110111@gmail.com --- (In reply to Stefan Dösinger from comment #5)
By the way: Please state which OS and window manager you are using. It shouldn't matter too much for the virtual desktop, but one never knows...
I'm using Kwin (KDE's window manager) in Linux.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #7 from hash HASH.DuOrden@gmail.com --- Gentoo, x86_64, gentoo-sources-3.18.0, sys-devel/gcc-4.8.3, sys-libs/glibc-2.20, x11-wm/compiz-0.8.8 and xfce-base/xfwm4-4.11.2, tested in both WM's.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #8 from Stefan Dösinger stefan@codeweavers.com --- I can't reproduce the problem with GTA Vice City (I assume that's what GTAVC means) in a virtual desktop. I have to click anywhere in the desktop once to cancel the non-playing intro video, but I never have a minimized window. I also tested this without the focus loss minimization call, it shows the same behavior.
hash, can you file a separate bug for the World of Tanks problem?
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #9 from Ruslan Kabatsayev b7.10110111@gmail.com --- (In reply to Stefan Dösinger from comment #8)
I can't reproduce the problem with GTA Vice City (I assume that's what GTAVC means) in a virtual desktop. I have to click anywhere in the desktop once to cancel the non-playing intro video, but I never have a minimized window. I also tested this without the focus loss minimization call, it shows the same behavior.
OK, I'll try to retest with current glib so that the video would not be played. Maybe it's because of the video window or whatever.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #10 from Stefan Dösinger stefan@codeweavers.com --- That's a reasonable guess. I'll see if I can make the video play here.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #11 from Ruslan Kabatsayev b7.10110111@gmail.com --- Indeed, disabling gstreamer and using current glib makes the game not minimized at startup. So looks like the video window is the bug trigger.
P.S. to make the video playable, you'd have to compile glib-2.30 or earlier and also gstreamer with plugins (plugins-bad, if I'm not mistaken) against this glib.
https://bugs.winehq.org/show_bug.cgi?id=37716
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69@gmail.com
--- Comment #12 from Béla Gyebrószki gyebro69@gmail.com --- The demo for Ghost Recon Advanced Warfighter 2 can be used to reproduce the regression caused by commit 45d530461bf29c953f5f4532cc0e917b4c4fc296.
http://www.gamershell.com/download_19955.shtml
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #13 from Stefan Dösinger stefan@codeweavers.com --- I can reproduce the problem with Ghost Recon Advanced Warfighter 2. The game minimizes before showing the intro videos.
The game destroys a window that is not the device window nor focus window after setting up the device. I assume the window is the splash screen window that is shown during the loading process. When the window is destroyed, Wine sets the window focus to the device (== focus) window. Unfortunately set_foreground_window first sets the active window to NULL, which sends WM_ACTIVATEAPP(wparam = 0), and then sets it to the device/focus window, which sends WM_ACTIVATEAPP(wparam = 1).
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #14 from Stefan Dösinger stefan@codeweavers.com --- The focus change behavior in user32 is correct in this case (old and new window are owned by different threads). What's probably wrong is that a window != the focus window has the focus in this situation.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #15 from Stefan Dösinger stefan@codeweavers.com --- Created attachment 50351 --> https://bugs.winehq.org/attachment.cgi?id=50351 user32: Call SetActiveWindow in SetWindowPos instead of SetForegroundWindow.
Please give this patch a try. It fixes graw2 for me, both inside a virtual desktop and with KDE. I didn't get gstreamer working yet, so I can't test GTA VC.
From the patch description:
Graw2 has a thread t1 owning a window w1 that is used as device and focus window for d3d. That makes w1 the active window for t1 and the global foreground window. Another thread t2 owns window w2, created before w1. w2 is used as a loading splash window. After creating the d3d device, w2 is repositioned with SetWindowPos(SWP_SHOWWINDOW) to match the d3d device's resolution.
Currently this SetWindowPos call makes w2 the foreground window. A while later w2 is destroyed, and the foreground window switches to w1. This switch (correctly) generates two WM_ACTIVATEAPP messages and the first of them causes wined3d to minimize the device window w1.
The SetWindowPos call also happens on Windows, but the splash screen is only seen after device creation with Aero disabled.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #16 from Ruslan Kabatsayev b7.10110111@gmail.com --- (In reply to Stefan Dösinger from comment #15)
Please give this patch a try. It fixes graw2 for me, both inside a virtual desktop and with KDE. I didn't get gstreamer working yet, so I can't test GTA VC.
Doesn't change anything for GTA:VC.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #17 from Ruslan Kabatsayev b7.10110111@gmail.com --- I've made a tarball with binaries of glib-2.30 and some version of gstreamer, so that you could test GTA:VC with it. Here's the tarball (22M archive): http://www.filedropper.com/glib-230tar
To setup and test, I've tested it on Ubuntu with the following operations:
0. Download it to ~/Downloads 1. Execute:
cd /tmp # important! tar xf ~/Downloads/glib-2.30.tar.bz2 ln -sv glib-2.30/lib/gstreamer-0.10/ . # I've hacked libgstreamer-0.10.so to look into /tmp/gstreamer-0.10/ for plugins, so these commands set up these temporary libs without needing root
2. Run GTA:VC like this
cd ~/opt/Games/Grand\ Theft\ Auto\ -\ Vice\ City LD_LIBRARY_PATH=/tmp/glib-2.30/lib/ wine explorer /desktop=gvc,1280x1024 gta-vc.exe
There'll likely be some warnings on the console about symbols not found, but these are not critical for the video format GTAVC uses, and I reproduce the bug with current wine and correct work with previous wine versions.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #18 from Sebastian Lackner sebastian@fds-team.de --- An alternative way to use gstreamer is to use Maarten Lankhorsts hack: http://repo.or.cz/w/wine/multimedia.git/commit/3b5ff65013ddae785ca9dffe2431c...
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #19 from Stefan Dösinger stefan@codeweavers.com --- Ruslan, I can reproduce the GTA:VC problem with your gstreamer build. Maarten's hack didn't work for me for some reason, but maybe my system gstreamer is missing some plugins.
The video plays fine with native quartz & friends (well, except that it tries to use ddraw overlays, which don't work, but if I refuse to create overlay surfaces it plays ok). So it is likely that the bug is somewhere in our gstreamer-based quartz implementation.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #20 from Stefan Dösinger stefan@codeweavers.com --- Created attachment 50366 --> https://bugs.winehq.org/attachment.cgi?id=50366 Focus loss backtrace
The focus loss in GTA:VC happens because of a user32.SetParent call. The attached file shows the backtrace of this call. The two windows belong to different threads. The parent window is the d3d8 focus and device window, which is also the current foreground window. I haven't found the exact place where the WM_ACTIVATEAPP(0) message is generated yet.
I don't understand the exact details yet, but it seems to be a different problem than the one that causes graw2 to crash. We should move graw2 into a different bug report.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #21 from Stefan Dösinger stefan@codeweavers.com --- Created attachment 50455 --> https://bugs.winehq.org/attachment.cgi?id=50455 user32: Silently ignore temporary foreground loss.
Can you give the attached patch a try? I don't expect it to fix GTAVC, but it fixes GRAW2 for me, while also working for Black Mirror 3 from bug 37843.
If the game starts properly, please test if it responds to keyboard input out of the box (i.e., without first clicking somewhere), if it minimizes properly when hitting alt-tab and if it works in a virtual desktop and without one.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #22 from Ruslan Kabatsayev b7.10110111@gmail.com --- Doesn't change anything for GTAVC.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #23 from Ruslan Kabatsayev b7.10110111@gmail.com --- Just saw that in GTASA the first two ad screens (EAX and Nvidia) show maximized as they should, but then it's intro movie turn, and the game window minimizes, as it does immediately at start for GTAVC and GTA3. Here though after the movie ends I'm not able to bring the window back because the icons on virtual desktop don't respond to any clicks.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #24 from Stefan Dösinger stefan@codeweavers.com --- Is GTASA using Quartz to play the videos as well?
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #25 from Ruslan Kabatsayev b7.10110111@gmail.com --- Yeah I guess so. At least quartz.dll listed in WINEDEBUG=+loaddll. And now I've succeeded in bringing the window back after the intro video. Just had to click on the name under icon, not the icon itself.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #26 from Henri Verbeet hverbeet@gmail.com --- For what it's worth, bug 37165 looks like a somewhat similar issue also fixed by attachment 50455 / 50728.
https://bugs.winehq.org/show_bug.cgi?id=37716
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.winehq.org/sho | |w_bug.cgi?id=37843
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #27 from Stefan Dösinger stefan@codeweavers.com --- GRAW2 should be fixed by ccf430eb52fb9a3a7c8bfdcbe7805025fb6f5dec. GTAVC still remains as this seems to be a bug in builtin quartz&friends code.
https://bugs.winehq.org/show_bug.cgi?id=37716
Stefan Dösinger stefandoesinger@gmx.at changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|stefan@codeweavers.com |stefandoesinger@gmx.at
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #28 from Ruslan Kabatsayev b7.10110111@gmail.com --- Still present in wine-1.9.15-197-g9ef65cf.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #29 from Ruslan Kabatsayev b7.10110111@gmail.com --- Still present in wine-2.0-235-g2dd0fb8 with GTA3 and GTAVC.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #30 from Ruslan Kabatsayev b7.10110111@gmail.com --- Still present in wine-2.5 with GTA 3,VC,SA.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #31 from Ruslan Kabatsayev b7.10110111@gmail.com --- Still present in wine-2.15-74-g083e61f.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #32 from Ruslan Kabatsayev b7.10110111@gmail.com --- Still present in wine-2.22-158-g47e9e91.
https://bugs.winehq.org/show_bug.cgi?id=37716
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=37716
Henri Verbeet hverbeet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|directx-d3d |quartz
https://bugs.winehq.org/show_bug.cgi?id=37716
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |z.figura12@gmail.com CC| |z.figura12@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=37716
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #33 from joaopa jeremielapuree@yahoo.fr --- Is still a bug in current wine (3.20)?
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #34 from Ruslan Kabatsayev b7.10110111@gmail.com --- Still happens in wine-3.20-144-g2ef62f9085.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #35 from Zebediah Figura z.figura12@gmail.com --- If anyone is able to test the patch from https://bugs.winehq.org/show_bug.cgi?id=10440#c15, that would be appreciated. I suspect it solves this bug too.
https://bugs.winehq.org/show_bug.cgi?id=37716
--- Comment #36 from Ruslan Kabatsayev b7.10110111@gmail.com --- (In reply to Zebediah Figura from comment #35)
If anyone is able to test the patch from https://bugs.winehq.org/show_bug.cgi?id=10440#c15, that would be appreciated. I suspect it solves this bug too.
This patch does solve the problem indeed.
https://bugs.winehq.org/show_bug.cgi?id=37716
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #37 from Zebediah Figura z.figura12@gmail.com --- (In reply to Ruslan Kabatsayev from comment #36)
(In reply to Zebediah Figura from comment #35)
If anyone is able to test the patch from https://bugs.winehq.org/show_bug.cgi?id=10440#c15, that would be appreciated. I suspect it solves this bug too.
This patch does solve the problem indeed.
Resolving duplicate then, thanks. This should be fixed as of 47ec8ce9113d875b0d4ac1d4f68c3dfc890ef140; if that's not the case please reopen.
https://bugs.winehq.org/show_bug.cgi?id=37716
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |DUPLICATE
--- Comment #38 from Zebediah Figura z.figura12@gmail.com ---
*** This bug has been marked as a duplicate of bug 10440 ***
https://bugs.winehq.org/show_bug.cgi?id=37716
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #39 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing Duplicate