Skip to content

wayland: Fix rendering and clicking on Hyprland - #340

Open
b2l wants to merge 1 commit into
rvaiya:masterfrom
b2l:hyprland-fixes
Open

wayland: Fix rendering and clicking on Hyprland#340
b2l wants to merge 1 commit into
rvaiya:masterfrom
b2l:hyprland-fixes

Conversation

@b2l

@b2l b2l commented Apr 30, 2026

Copy link
Copy Markdown

Hyprland requires layer surfaces to declare their actual size via
set_size — the previous hardcoded 10x10 caused surfaces to be
invisible. Use the actual requested dimensions instead.

Set empty input regions on visual surfaces (hints, cursor boxes) so
virtual pointer events pass through to the target window.

Hyprland routes virtual pointer events to the keyboard-exclusive
surface, preventing clicks from reaching the target. Work around this
by temporarily destroying and recreating the input surface around
each click.

Fix discover_pointer_location reliability by committing the virtual
pointer frame and using wl_display_roundtrip to ensure the compositor
processes each motion event.

Fix way_input_ungrab_keyboard hanging on Hyprland — the original code
waited for keyboard focus to return to another warpd surface, but no
such surface exists after the input surface is destroyed.

Note: virtual pointer scroll and drag events have the same
keyboard-exclusive routing issue but are not addressed here.

Note 2: honnestly I don't know much about the topic and heavily used
Claude Code to get the fix I wanted.
I'll be happy to rework the PR if you want :)

Hyprland requires layer surfaces to declare their actual size via
set_size — the previous hardcoded 10x10 caused surfaces to be
invisible. Use the actual requested dimensions instead.

Set empty input regions on visual surfaces (hints, cursor boxes) so
virtual pointer events pass through to the target window.

Hyprland routes virtual pointer events to the keyboard-exclusive
surface, preventing clicks from reaching the target. Work around this
by temporarily destroying and recreating the input surface around
each click.

Fix discover_pointer_location reliability by committing the virtual
pointer frame and using wl_display_roundtrip to ensure the compositor
processes each motion event.

Fix way_input_ungrab_keyboard hanging on Hyprland — the original code
waited for keyboard focus to return to another warpd surface, but no
such surface exists after the input surface is destroyed.

Note: virtual pointer scroll and drag events have the same
keyboard-exclusive routing issue but are not addressed here.

Note 2: honnestly I don't know much about the topic and heavily used
Claude Code to get the fix I wanted.
I'll be happy to rework the PR if you want :)
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.

1 participant