-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
warp-mouse-to-focus doesn't work when focus is set by wlrctl #409
Comments
It probably uses the foreign toplevel management protocol to focus a window. The problem is that if we were to warp the mouse to focus there, it would also trigger when clicking on a window in taskbars for example. Since niri doesn't know what kind of event resulted in the focus change through this protocol. |
Very good point, I've been trying to think of a way to satisfy both sides. Would it be reasonable to assume that if a focus event (of any kind) resulted in focus moving to a different monitor/workspace, and |
Different monitor I can see (I think people generally configure bars to show only the current monitor's windows, so it won't warp on the current monitor); different workspace will hit the same problem though. I wonder how other compositors handle this? |
Coming from sway, it had its own command for changing focus (i.e. Adding a similar command to niri is certainly another option, if you were willing to allow it to switch workspaces in order to make the newly focused window visible (automatic If automatic workspace switching is a barrier, a simpler option would be to add a command that allows us to query which workspace a window is on (i.e. |
That is the plan; pending on some more IPC additions. |
I have
warp-mouse-to-focus
enabled, which works great when using niri's keybindings to switch between windows and monitors.However, I've also started experimenting with using
wlrctl
to focus certain windows, since I can script it and launch the given program if the window isn't open.Which works great, except that I've noticed the mouse never moves to the window that receives focus in this way. This is especially noticeable when the focused window is on a secondary monitor, and the mouse remains on the primary monitor, requiring an extra step to move the mouse to the focused window without triggering scrolling.
I don't know if this is a wlrctl issue, or a "focus wasn't set by niri" issue, but figured it was worth mentioning.
System Information
The text was updated successfully, but these errors were encountered: