SDL2-based fullscreen windows have wrong position after Alt+Tab or workspace swiching
(I am not sure whether this is about GNOME Shell or Mutter. I was not able to reproduce this issue with "bare" mutter on Xorg because in that context I wasn't able to focus game window with Alt+Tab.)
OS: Arch Linux Package versions: astromenace-1.4.0-1, hedgewars-0.9.25-16, gnome-shell-1:3.32.1-1, mutter-3.32.1-1, sdl2-2.0.9-1
Hedgewars is a Worms-like game. It has two windows: one, Qt5-based with basic game settings and second — SDL-based with game itself (visible while playing only). When fullscreen is enabled in Hedgewars and I'm playing (so game window is visible as fullscreen), I am trying to switch to different workspace or window using Alt+Tab (no matter whether app swicher or window switcher), sometimes GNOME Shell (mutter?) improperly calculates new position for game window, making it fullscreen but not placed at x=0, y=0. See attached videos.
I am able to reproduce this on Wayland, on Xorg, with app switcher or window switcher, without any shell extensions (or with ofc). In my videos there are defaults settings for both game and GNOME itself (in Hedgewars settings I enabled fullscreen). Basically I am pressing Alt+Tab or eventually switching activities/workspaces. There are two workspaces: first with gedit. In second there is main Qt-based window ("Hedgewars") and second fullscreen ("hwengine"). I didn't saw any additional output in console, when shell was (re)started manually from terminal.
Also, I am able to reproduce wrong window position in different SLD2-based game, astromenace.
Wayland, default Alt+Tab: hedgewars_wayland
Xorg, default Alt+Tab: hw_xorg
Xorg, Alt+Tab window switcher: hw_xorg_window_switcher