Skip to content

ipc: expose surface_content_rect in get_tree - #9207

Open
jbms wants to merge 1 commit into
swaywm:masterfrom
jbms:sway-ipc-surface-content-rect
Open

ipc: expose surface_content_rect in get_tree#9207
jbms wants to merge 1 commit into
swaywm:masterfrom
jbms:sway-ipc-surface-content-rect

Conversation

@jbms

@jbms jbms commented Jul 1, 2026

Copy link
Copy Markdown

Expose the actual view geometry (as set by the client via xdg-shell set_window_geometry) in the IPC get_tree output as 'surface_content_rect'.

This is useful for clients using protocols like ext-image-copy-capture-v1 to capture foreign windows. Since the capture contains the full window surface (including Client-Side Decorations, shadows, etc.), the client needs to know the offset of the actual window content within the captured image. The surface_content_rect field exposes this offset (x, y) and size (width, height) relative to the surface.

Expose the actual view geometry (as set by the client via xdg-shell
set_window_geometry) in the IPC get_tree output as 'surface_content_rect'.

This is useful for clients using protocols like ext-image-copy-capture-v1
to capture foreign windows. Since the capture contains the full window
surface (including Client-Side Decorations, shadows, etc.), the client
needs to know the offset of the actual window content within the captured
image. The surface_content_rect field exposes this offset (x, y) and size
(width, height) relative to the surface.
@emersion

emersion commented Jul 2, 2026

Copy link
Copy Markdown
Member

This sound like something which should be discussed in wayland-protocols.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants