protonscr

Add Window Identifier to xdg-desktop-portal Requests

steamopen Feature RequestWindow manager
ValveSoftware/steam-for-linux#11831 · opened 2025-03-18 by bbb651 · updated 2025-03-18 · 0 comments · github
Bbbb651 2025-03-18 github

Looking at the org.freedesktop.portal.FileChooser /org/freedesktop/portal/desktop request (captured with Bustle) steam makes:

("", "Pick game to add", {"current_filter": <("Applications (*.application, *.exe, *.sh, *.AppImage)", [(uint32 0, "*.application"), (0, "*.exe"), (0, "*.sh"), (0, "*.AppImage")])>, "current_folder": <b"">, "directory": <false>, "filters": <[("Applications (*.application, *.exe, *.sh, *.AppImage)", [(uint32 0, "*.application"), (0, "*.exe"), (0, "*.sh"), (0, "*.AppImage")]), ("All Files", [(0, "*")])]>, "handle_token": <"steamfileopenportal1477216320">, "modal": <false>, "multiple": <false>})

The first argument in the request is the window identifier, specifically in x11:

Under X11, the "parent_window" argument should have the form x11:<XID>, where <XID> is the XID of the application window in hexadecimal notation. For example, x11:1234.

This is used to parent the file dialog window to steam, group it in the taskbar, transfer focus to it with strict focus stealing prevention on wayland, etc.

(Afaik this should also work on xwayland, I made a test with a x11 window + portal but I cannot test it on my setup as xwayland-satellite doesn't yet support xdg-foreign)

Nothing extracted yet.