GNOME Bugzilla – Bug 776992
In Wayland, Endless Sky game's window drawn in the wrong place when alt-tabbing away and back again
Last modified: 2021-07-05 13:45:34 UTC
Software: Fedora 25 + GNOME 3.22 + Wayland Hardware: Kaby Lake (late 2016) HP Spectre x360 laptop, Intel HD 620 integrated graphics card, 13.3" display, Kernel 4.10-rc2 (though this has happened since 4.8). A graphical anomaly is seen with the SDL-based video game Endless Sky on Fedora 25 with Wayland. When the game is being played full-screen, alt-tabbing away and back again results in the game's window being drawn in the wrong location: offset down and to the right. Here is a screen recording indicating the problem: http://hommelscitadel.com/wp-content/uploads/2016/12/not_quite_right.webm The issue is 100% reproducible with Wayland every way I try, but not seen if I log into an X session and try the same things. I originally filed this against Endless Sky: https://github.com/endless-sky/endless-sky/issues/1902. The developer said it was SDL or Wayland so I filed bugs for them: https://bugzilla.libsdl.org/show_bug.cgi?id=3548 https://bugs.freedesktop.org/show_bug.cgi?id=99088 The Wayland folks say it's not them and it might be GNOME shell, or mutter. So... here I am :)
What SDL backend is used? I suspect that the X11 backend is used, meaning it could also be an Xwayland issue, but leave this bug open either way until we figured out where it is.
How can I tell? I'm a bit new to this, but if you tell me how to gather that piece of information, I'll do it ASAP.
Two ways: In gnome-shell: 1. Open Endless Sky 2. Alt-F2 3. Enter "lg" and press Enter. 4. Press "Windows" 5. Find the Endless Sky window and click it (the title t.ex.) 6. The text on the top will either include something about a MetaWindowX11 or a MetaWindowWayland. The other way: 1. Open a terminal 2. Start Endless Sky with: WAYLAND_DEBUG=1 ./CommandToStartEndlessSky 3. Exit Endless Sky 4. If the terminal is filled with things like ... [3792346,667] wl_callback@37.done(3862151150) [3792351,427] -> wl_surface@22.attach(wl_buffer@32, 0, 0) [3792351,466] -> wl_surface@22.set_buffer_scale(1) [3792351,476] -> wl_surface@22.damage(32, 29, 59, 34) ... and similar things, it's using Wayland. If it does not, it's probably not. If you're unsure, you can attach the output here and I'll have a look.
Looks like it's not using Wayland. $ WAYLAND_DEBUG=1 endless-sky [no output] $ So this might be an Xwayland bug, then? Or with SDL? Side note, is this an SDL bug that it's not using Wayland, or would that be on Endless Sky's developer?
Either Xwayland or mutter. Would have to investigate further to know.
Moving to mutter. I doubt it's related to gnome-shell directly.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/mutter/-/issues/ Thank you for your understanding and your help.