Skip to content

InputManager: Fix touch monitor focus ordering - #14310

Merged
vaxerski merged 1 commit into
hyprwm:mainfrom
Golim:fix-touch-focus
May 9, 2026
Merged

InputManager: Fix touch monitor focus ordering#14310
vaxerski merged 1 commit into
hyprwm:mainfrom
Golim:fix-touch-focus

Conversation

@Golim

@Golim Golim commented May 6, 2026

Copy link
Copy Markdown
Contributor

This PR contains two small fixes.

Fix touch handling for monitor-bound touch devices

When a touch device is bound to a specific monitor, onTouchDown() computes touch coordinates and calls refocus() before updating Hyprland's focused monitor. This causes touch input on layer-shell surfaces, such as bars, to not be recognised when another monitor is focused. Normal windows still receive the touch correctly, but layer-shell surfaces like Waybar or quickshell bars do not activate unless the touch-bound monitor is already focused. This should be the same issue discussed here, but their "solution" is just a dirty hack, while my patches fix this completely in my tests.

The patch simply moves rawMonitorFocus(PMONITOR) before coordinate handling, so Hyprland focuses the monitor associated with the touch device before routing the touch event.

Fix zoom factor crash

While debugging, I noticed a startup crash due to a typo in src/config/supplementary/propRefresher/PropRefresher.cpp due to a typo: CPropRefresher::scheduleRefresh() requested cursor.zoom_factor, while it should be cursor:zoom_factor. This path also fixes that.

@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown

Hello and thank you for making a PR to Hyprland!

Please check the PR Guidelines and make sure your PR follows them.
It will make the entire review process faster. :)

If your code can be tested, please always add tests. See more here.

beep boop, I'm just a bot. A real human will review your PR soon.

@vaxerski

vaxerski commented May 6, 2026

Copy link
Copy Markdown
Member

the crash was merged rebase

@Golim
Golim force-pushed the fix-touch-focus branch from fc63e74 to ce86f62 Compare May 7, 2026 06:33
@vaxerski

vaxerski commented May 8, 2026

Copy link
Copy Markdown
Member

needs another rebase xD

@Golim
Golim force-pushed the fix-touch-focus branch from ce86f62 to 706291a Compare May 9, 2026 06:42
@vaxerski
vaxerski merged commit 11bd00c into hyprwm:main May 9, 2026
11 of 13 checks passed
@Golim
Golim deleted the fix-touch-focus branch May 9, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants