Skip to content

Overlay: an XWayland surface's hit regions follow every frame it draws - #279

Merged
thdxr merged 2 commits into
devfrom
fix-xwayland-drawn-regions
Nov 8, 2026
Merged

thdxr merged 2 commits into
devfrom
fix-xwayland-drawn-regions

Conversation

@thdxr

@thdxr thdxr commented Nov 8, 2026

Copy link
Copy Markdown
Member

An XWayland overlay only published its hit regions on a frame that drew nothing new, so one that redraws every frame (a capsule with a ticking clock) kept the empty input shape it was created with and took no clicks on a Wayland desktop without layer-shell.

Every drawn frame now also sets the surface's input shape from the geometry it drew, through the same XwaylandSurface::regions that apply_input and unchanged_frame already use. It returns early when the shape is unchanged, so the per-frame call is cheap.

Closes #276. Reported with a diagnosis by @pkkid in anomalyco/hex#1526.

thdxr added 2 commits November 8, 2026 01:29
Only a frame that drew nothing new published the overlay's hit regions to its
XWayland surface, so an overlay that redraws each frame kept the empty input
shape it was created with and took no clicks on a Wayland desktop without
layer-shell.
The comment on the XWayland region update described the surface shape applying and most frames drawing it unchanged. Name the mechanism instead: an X11 input shape applies at once with no commit, and `regions` skips an unchanged shape.
@thdxr
thdxr force-pushed the fix-xwayland-drawn-regions branch from d851077 to 5852329 Compare November 8, 2026 06:29
@thdxr
thdxr merged commit f2fb51e into dev Nov 8, 2026
1 check passed
@thdxr
thdxr deleted the fix-xwayland-drawn-regions branch November 8, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

XWayland overlays never update their input shape on a drawn frame, so a redrawing overlay takes no clicks

1 participant