Repository navigation
android: GAMENATIVE_ROOT_DESKTOP switches A26, A33 and A48 off on wine's root desktop - #39
Closed
utkarshdalal wants to merge 1 commit into
Closed
utkarshdalal wants to merge 1 commit into
utkarshdalal wants to merge 1 commit into
Conversation
…e's root desktop The three patches exist only for wine's virtual desktop, where the game's window is nested in one desktop window. With GAMENATIVE_ROOT_DESKTOP=1 the guest runs on wine's root desktop instead: A26 keeps upstream's app id, A33 never blanks and A48 never sends its bring-to-front request. Unset or any other value keeps today's behavior, so one binary serves both launch modes.
Closed
1 of 8 tasks
joshuatam
deleted the
root-desktop-switch-for-virtual-desktop-patches
branch
November 16, 2026 14:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The app is getting a second launch mode for newer Proton builds:
wine explorer /desktop=rootinstead of/desktop=shell,WxH. There is no virtual desktop window then; each game window is a managed top-level X window, which is what upstream gamescope expects.Three patches exist only for the virtual-desktop model, where gamescope sees one top-level window (wine's desktop) with the game nested inside it:
0026-A26-uniform-app-id.patch) gives every window app id 1.0033-A33-blank-while-game-window-absent.patch) blanks the output while the game's window is absent, so wine's desktop is not shown at startup and exit.0047-A48-bring-nested-app-window-to-front.patch) sends winhandler.exe a bring-to-front request when a nested child maps.This PR adds one environment variable,
GAMENATIVE_ROOT_DESKTOP, read once at startup. The app sets it for root-desktop sessions.0or any other value: the three patches act as today. The only difference is one addedroot_desktop=0field in A33'ssession-blanklog line.1: A26 keeps upstream'sappID(the X window id), A33 never raises either blank, and A48 never sends.The three patch files are edited in place and regenerated at their position in the series; no files are renamed or added. The helper lives in A26 because it is the earliest of the three.
android/README.mdgets a short section on the variable.Relation to #38: that PR drops the three patches for everyone. This one has the same effect for root-desktop sessions but keeps the patches for virtual-desktop sessions, which older Proton builds still use (NFS Most Wanted needs A48 there, per the comments on #38).
Two things the variable does not switch:
1, app ids are window ids, so agamescope_controlperformance-stats request for app id 1 (what A26 was there for) matches no window. The app side needs another way to name the window before relying on those stats in root sessions.rendervulkan.cpp) stays for both modes. The upstream overlay hack-plane also uses that texture.Tested
git apply --checkon a clean checkout ofgamenative3d10d68. I applied the old and new series to two clean trees and diffedsrc/: the only differences are the helper, the gated sites and the log field. The wlroots trees are identical. Diagnostics 0018 applies. Diagnostics 0023 already fails ongamenativewithout this change.Observations from 2026-11-15 on an AYN Odin 3 with the current payload, all three patches active, root desktop: a normal game (top-level 1280x720, focused) took pad input with no A48 log lines and exited cleanly. In one root session A33 held its blank for the whole session because no newer commit arrived, so A33 does act under the root desktop.