Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touchpad horizontal view movement (three-finger swiping left/right) doesn't respect warp-mouse-to-focus #1291

Open
yrkv opened this issue Mar 18, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@yrkv
Copy link

yrkv commented Mar 18, 2025

I have warp-mouse-to-focus set in the input section of my configuration, but using touchpad gestures to move within the workspace (horizontal view movement) frequently results in a different window being focused than the one under the mouse after swipe gestures, which doesn't happen for binding-based focus changing. I believe it should apply, as in all other ways, touchpad gestures behave equivalent to moving the focus via binds or niri msg action.

This is inconvenient for my usage as when it occurs it makes scrolling and typing go to two different windows after touchpad gestures. This would not happen with other ways of changing which window is focused.

My expected behavior is for warp-mouse-to-focus to cause the mouse to warp to the newly focused window upon the completion of a touchpad left/right swipe gesture.

System Information

System information shouldn't matter for this, it's a behavior thing.

  • niri version: niri 25.02 (0a4cc29-modified)
    (my local changes do not affect any part of this behavior)
  • Distro: archlinux
  • GPU: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630]
  • CPU: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
@yrkv yrkv added the bug Something isn't working label Mar 18, 2025
@yrkv
Copy link
Author

yrkv commented Mar 18, 2025

Example:

Starting with two windows open, with A currently focused.
Image
When I use my touchpad to three-finger swipe right to trigger the horizontal view movement gesture, it switches focus to B.
Image
However, the mouse remains over A, and warp-mouse-to-focus doesn't seem to apply despite there being a newly focused window (B).

If I instead use a bind to change the focus, it behaves exactly the same except it warps the mouse to the newly focused window.

@YaLTeR
Copy link
Owner

YaLTeR commented Mar 18, 2025

Maybe there's a function call missing to apply it. Though need to be careful since the same gesture is used by Mod+MMB and there it probably shouldn't warp

@yrkv
Copy link
Author

yrkv commented Mar 18, 2025

Right, I didn't consider Mod+MMB since I don't use a mouse.

After plugging in a mouse to try Mod+MMB, it kinda feels like focus-follows-mouse should apply for Mod+MMB and warp-mouse-to-focus should apply for touchpad 3swipe (currently neither do).

Key difference is that with mouse, the user is moving the pointer in Mod+MMB, so taking away control to warp it would feel off. With touchpad 3swipe, the pointer is effectively locked in place while it happens, so warping it upon completion makes more sense to me (at least, that's the behavior I would like to see).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants