android: report an X11-drawn game window to the daemon (A43)
The app's "Launching game..." splash under gamescope goes away only when the daemon receives a GameWindowNote. At the moment only the guest ICD shim sends that note, from its swapchain present path. A game that never presents through the shim's WSI proxy therefore keeps the splash up forever while it runs behind it. Examples are an OpenGL game whose zink output reaches X as plain drawing (Balatro) and a GDI game.
A game like that draws into a child of wine's desktop window, and Xwayland commits the desktop window's own surface for each frame. New patch A43 counts those main-surface commits on the focused window per second, while no override surface is bound. When one second has at least 20 commits and the desktop window has a game child, gamescope sends the same note on a new GAMENATIVE_DRM_SOCKET connection. The child must match the shim's rule: viewable, InputOutput, larger than 1x1, and a readable WM_CLASS instance that is not the desktop's. Gamescope sends the note at most three times, once per qualifying second, in case a racing connection drops one. The daemon latches the first note. The daemon and the shim do not change.
Games that present through the shim do not change. When their override surface is bound, their frames no longer arrive on the main surface and the count resets. Before the first present, a mapped window that does not change commits far fewer than 20 times per second, so the splash does not go away too early.
Tested on a POCO F6 (Adreno 735, Turnip, Proton 11.0-2-arm64ec-7, legacy build), with only bin/gamescope replaced in payload 20261022.13:
- Balatro (2379780):
game-window: X11 game window drawing on 0x600004 (31 commits/s): note sent (1/3)about 9 s after the launch. The splash cleared and the main menu showed. Before this change the splash stayed up. - Blazing Chrome (609110, DXVK): gamescope sent no note. The shim reported the window at its first present (
x11 game-window predicate ... present=true) as before, and the game ran.