Bug#1038738: sdl12-compat + asc: mouse cursor cannot reach top of fullscreen window under GNOME + Xwayland

Simon McVittie smcv at debian.org
Tue Jun 20 19:04:08 BST 2023


Package: libsdl1.2-compat,asc
Severity: important
Forwarded: https://github.com/libsdl-org/sdl12-compat/issues/256
Control: found -1 libsdl1.2-compat/1.2.60-1
Control: found -1 libsdl1.2-compat/1.2.64-2
Control: found -1 asc/2.6.1.0-9+b4
User: pkg-sdl-maintainers at lists.alioth.debian.org
Usertags: sdl12-compat-regression

sdl12-compat is a compatibility layer that implements the SDL 1.2 API/ABI
by dlopening SDL 2 and using that instead. During the Debian 13 cycle,
I want to replace the unmaintained "classic SDL 1.2" with sdl12-compat.
I tested lots of older games with sdl12-compat during the Debian 12 freeze
and upstream was able to apply fixes or workarounds, but unfortunately asc
is one of the few for which using sdl12-compat exhibits a regression.
It's not clear whether this is an asc bug, or a sdl12-compat bug.

Prerequisites:

* Debian 12 system (with or without upgrading libsdl1.2-compat from
  unstable)
* GNOME 43 in Wayland mode (*not* "GNOME on Xorg")
* sudo apt install asc libsdl1.2-compat

To reproduce:

export SDL12COMPAT_DEBUG_LOGGING=1
asc
SDL_VIDEODRIVER=x11 LD_LIBRARY_PATH='/usr/$LIB/sdl12-compat' asc
SDL_VIDEODRIVER=wayland LD_LIBRARY_PATH='/usr/$LIB/sdl12-compat' asc

While the LD_LIBRARY_PATH is set, check that you see this as the first line
of output:
> INFO: sdl12-compat 1.2.60, built on (date) at (time), talking to SDL2 2.26.5

Expected result:

* Mouse cursor can be moved anywhere in the fullscreen window

Actual result:

* With classic SDL 1.2 (simple "asc" command), it works as expected.

* With libsdl1.2-compat and X11 via Xwayland, I can't move the cursor
  into the top few rows of pixels. The inaccessible region is rougly the
  same height as the menubar at the top; I think its exact size might
  vary between runs.

* With libsdl1.2-compat and SDL_VIDEODRIVER=wayland, I can't move the
  cursor into a larger area at the top (I would estimate 4x the height
  of the menubar), and I also can't move it into a region to the left
  (about the same width as the minimap on the right).

Workarounds:

1. Log out from GNOME, log back in to "GNOME on Xorg" and run the game
   that way; in this case it works fine.
2. Alt+Tab to another window (like the terminal you ran it from)
   and back to the game
3. Press the Super (Windows) key to zoom out to the GNOME Overview, then
   click on the game window to zoom back in to it

Any of these seems sufficient to make asc work as expected.

SDL upstream speculates that there might be something unusual about the
exact sequence of SDL API calls that result from asc using sdl12-compat.

KDE Plasma in Wayland mode does not seem to exhibit this issue, so it's
possible that it's a compositor/window manager bug, but it's weird that
it only happens with sdl12-compat.

    smcv



More information about the Pkg-games-devel mailing list