wayland: Fix rendering and clicking on Hyprland - #340
Open
b2l wants to merge 1 commit into
Open
Conversation
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 :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 :)