You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support consent-based single-window screenshots on Wayland
#592
Please add a consent-based way to capture a single native Wayland window as a PNG. Accessibility snapshots and semantic click/type already work in my GNOME session, but window screenshots are unconditionally rejected. Window-only images would let an agent verify the rendered UI without capturing unrelated desktop content.
Tested against a temporary GTK4 window using GdkWaylandDisplay; semantic click and Unicode text input were independently verified in the app.
# Use an actual ID returned by list-windows:
agent-desktop screenshot --window-id <window-id> /tmp/window.png
The command returns:
{"version":"2.6","ok":false,"command":"screenshot","error":{"code":"PLATFORM_NOT_SUPPORTED","message":"A single window cannot be captured on a Wayland session","suggestion":"Capture the screen instead, or run the application in an X11 session","disposition":{"delivery":"not_delivered","retry":"safe"}}}
The current capture routing also rejects every Wayland ExactWindow request before attempting a portal capture.
Requested behavior
Support window-only capture through a desktop-supported, user-consented route, with capability detection and accurate unsupported/denied errors.
An explicit user-selected-window mode would already be useful. If a selected stream cannot be reliably matched to an existing --window-id or --app target, expose that distinction rather than claiming an exact target match.
Do not silently replace a window request with a whole-desktop screenshot. Document any chooser, focus or session requirements.
Possible implementation directions
The Screenshot portal v3 defines AvailableTargets and a user-selected window target. Backends advertising that capability may provide a direct route.
For older Screenshot backends, could a single frame from a consented ScreenCast window stream be an alternative? On this machine, Screenshot reports version 2 with no AvailableTargets, while ScreenCast reports version 5 and AvailableSourceTypes = 7, including WINDOW. These are capability probes only; I have not implemented or validated either capture approach or exact window-ID mapping.
This is a feature request for window capture, distinct from the fractional-scale display-cropping bug in #448.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Problem / use case
Please add a consent-based way to capture a single native Wayland window as a PNG. Accessibility snapshots and semantic click/type already work in my GNOME session, but window screenshots are unconditionally rejected. Window-only images would let an agent verify the rendered UI without capturing unrelated desktop content.
Reproduction and environment
GdkWaylandDisplay; semantic click and Unicode text input were independently verified in the app.The command returns:
{"version":"2.6","ok":false,"command":"screenshot","error":{"code":"PLATFORM_NOT_SUPPORTED","message":"A single window cannot be captured on a Wayland session","suggestion":"Capture the screen instead, or run the application in an X11 session","disposition":{"delivery":"not_delivered","retry":"safe"}}}The current capture routing also rejects every Wayland
ExactWindowrequest before attempting a portal capture.Requested behavior
--window-idor--apptarget, expose that distinction rather than claiming an exact target match.Possible implementation directions
The Screenshot portal v3 defines
AvailableTargetsand a user-selected window target. Backends advertising that capability may provide a direct route.For older Screenshot backends, could a single frame from a consented ScreenCast window stream be an alternative? On this machine, Screenshot reports version 2 with no
AvailableTargets, while ScreenCast reports version 5 andAvailableSourceTypes = 7, including WINDOW. These are capability probes only; I have not implemented or validated either capture approach or exact window-ID mapping.This is a feature request for window capture, distinct from the fractional-scale display-cropping bug in #448.
All reactions