GNOME Bugzilla – Bug 743339
X app running in Gnome-Wayland disappears when minimized.
Last modified: 2015-09-25 17:32:12 UTC
There's this free-to-play game I play in Linux called "Wakfu"; it's an MMORPG that has a launcher, and when you click "play" in the launcher, it auto-minimizes and launches the actual game client. When the launcher minimizes, it completely disappears from the session; there is no way to get it back if I go to the activities view, and even with the task list extension enabled, it doesn't show up there either. The application isn't crashing or anything, it's still running in the background somewhere, it just disappears from view for some reason. The game window itself can be minimized without issue, and I can bring it back anytime, but not the launcher. This is problematic because I often run two of these clients at once, so I need to be able to get back to the launcher after it auto-minimizes, and launch a second game client. Interesting trivia: - Both the game client and launcher use custom window decorations; oddly enough this appears to result in the launcher (but not the game) having dual-titlebars (this happens in Gnome-Xorg too, not just Gnome-Wayland). - The bug I described can occur when you try to minimize the launcher using the custom window decoration titlebar buttons, or when it auto-minimizes after clicking "play"; if you try to use the Gnome titlebar to rightclick and then minimize, all of Gnome crashes when in a Wayland session. - The game is written in Java, but I believe the launcher might be a Qt app, not 100% sure. - I originally discovered the issue because I had a problem in Gnome (Xorg session) where Alt-Tab would randomly stop working when trying to Alt-Tab between two instances of the game client, and I had the idea to see if this bug was still present in Gnome-Wayland, which if not, might help narrow down what was causing the problem; I was stopped by this bug, since I can't actually run two copies of the game in Gnome-Wayland, unless there's a way to stop the launcher from auto-minimizing. I only mention this because maybe it hints at something really weird that the application is doing, that might cause these issues. (I'll probably file another bug report for the Alt-Tab issue later.) This is my first bug report here, so I hope I haven't violated any reporting etiquette, thanks in advance for taking the time to read.
I've just installed Fedora rawhide on a different machine, so I could test this in Gnome 3.15, and I've confirmed that the issue is still present as of this post date; minimizing the app still makes it disappear in 3.15.
Xwayland 1.17 doesn't solve it either (just updated rawhide to get 1.17). Would it help if I recorded a video of the problem or something?
Tried to install wakfu but the installer just crashes here. Makes it difficult to debug...
(In reply to Rui Matos from comment #3) > Tried to install wakfu but the installer just crashes here. Makes it > difficult to debug... Really? That's odd, it might be missing some old dependencies or something, like old versions of libpng and so on (I think it might also need 32bit dependencies even if you download the 64bit installer, but I forget); did you run it in a terminal? Also, what distro are you on, maybe I could install it and see if I run into the same issue with the installer. P.S.: I'm sorry it took awhile to respond, I just now noticed there was a response, I had been checking every now and again. Since Fedora 23 aims to ship Wayland as default though, I'm assuming this issue might become a blocker (assuming others can reproduce it, which so far I have on two completely different PCs with different GPUs/etc).
It's Fedora 22. Can you point out the steps to get the installation done?
(In reply to Rui Matos from comment #5) > It's Fedora 22. Can you point out the steps to get the installation done? Ok, I just tried it in a qemu/kvm virtual machine with fedora 22. You need to install the following package: https://admin.fedoraproject.org/pkgdb/package/libpng12/ -- after that, the installer should start. You don't have to fully install the game, as the installer itself is actually the "launcher/updater" I mention in the bug report, so you should be able to reproduce the issue right away by trying to minimize it. This is what it looks like http://i.imgur.com/gw9QqBX.jpg
Created attachment 312149 [details] test program The problem is that the game's installer/launcher window undecorates itself while minimizing (why? - perhaps file a bug with the developers) and this hits a bug in mutter's xwayland window/surface association, patch incoming. This small gtk+ program reproduces the issue.
Created attachment 312150 [details] [review] xwayland: Fix windows disappearing on reparenting If the wayland surface isn't available yet when we process the WL_SURFACE_ID ClientMessage, we schedule a later function to try the association again after we get a chance to process wayland requests. This works fine except on cases where the MetaWindow already had a previous surface attached (i.e. when the xwindow is reparented) since we only break the existing association on the later function which means that when processing the old surface's destruction we destroy the MetaWindow and cancel the pending later function leaving us without a MetaWindow and an invisible surface. Fix this by detaching the old surface as soon as possible so that the MetaWindow survives.
Review of attachment 312150 [details] [review]: Ah, yes.
Attachment 312150 [details] pushed as 69c267b - xwayland: Fix windows disappearing on reparenting