gamescope: EA sign-in stays above the EA launcher's splash (#2037)

* gamescope: EA sign-in stays above the EA launcher's splash

The EA app's Steam launcher shows the game's splash as a layered tool
window, and the EA app, another process, opens its sign-in window
topmost. gamescope took the splash as the sign-in's override window, so
the splash was painted over the sign-in and became gamescope's keyboard
focus window (Burnout Paradise Remastered). With patch 0126 a window from
another process that is neither topmost nor transient for a topmost
focus window is no longer an override candidate for it, as on Windows.
map_win now also reads _WINE_HWND_EXSTYLE: gamescope only took it from a
PropertyNotify, which it listens for from map on, so a style Wine set
before mapping was never known.

* gamescope: the topmost rule needs both windows' pids

gamescope keeps a window's pid at -1 when XRes cannot name its client,
so an unknown pid next to a known one is not evidence of two processes.
Patch 0126 now applies the rule only when both pids are known. The patch
carries function names in its hunk headers, and the test also checks
that its map_win hunk reads _WINE_HWND_EXSTYLE into hasHwndStyleEx (a
check of the patch text, not of a running gamescope).
This commit is contained in:
K11MCH1 authored and GitHub committed 2026-11-03 07:41:24 -05:00
1 parent b7b08a40e8
commit 951270bc8f
3 files changed
+160

No files matched your search

+16
View File
@@ -209,3 +209,19 @@ the connector's windows (`mangoapp_nudge_app_frame`). With `DROIDDECK_HUD_FRAMES
sets `/run/droiddeck-hud/frames`), gamescope maps that file and writes the same commits of connector 0,
whether or not a mangoapp runs, plus the focused pid, output size, refresh, Steam focus and engine name.
The layout is in the comment above `droiddeck_hud_frames_map`; the app reads it in `hudframes.c`.
## 0126 steamcompmgr: a topmost focus window keeps other processes' windows beneath it
EA games on Steam start through the EA app. Its Steam launcher (`EASteamLauncher.exe`) shows the
game's splash as a layered tool window, and the EA app (`EADesktop.exe`, another process) opens its
sign-in window `WS_EX_TOPMOST`. gamescope took the splash as the sign-in's override window, so it was
painted over most of the sign-in and became gamescope's keyboard focus window (Burnout Paradise
Remastered, `gamescopectl focus_info`). On Windows a topmost window stays above every window that is neither topmost nor
owned by it, so a window from another process that is neither is no longer an override candidate for
a topmost focus window. Both windows' pids must be known; gamescope keeps -1 when XRes cannot name the
client, which says nothing about the process. Same-process popups, topmost popups (WebView2 and CEF menus) and windows
transient for the focus window are unchanged. gamescope read `_WINE_HWND_EXSTYLE` only from a
PropertyNotify, and it listens for those from map on, so the style Wine sets before mapping a window
was never known; `map_win` now reads it with the other properties, which the layered-launcher and
Xalia rules rely on too. `tools/tests/test_gamescope_override_stacking.py` compiles the rule from
this patch.