Hyprland
Hyprland copied to clipboard
focuswindow without mouse cursor capture
Description
Currently when calling the focuswindow dispatcher the mouse is warped to the centre of the focussed window. Is it possible to focus a window without affecting the mouse cursor?
An example use-case is cycling between instances of an application via a taskbar widget using the mouse - every time a window is focussed, the mouse warps away from the taskbar widget to the center of focussed window. In this case I would like to have the user scroll-wheel through all instances of an application, but the current cursor warping makes this is impossible.
general:no_cursor_warps https://wiki.hyprland.org/Configuring/Variables/#general
?
I was thinking more like a flag that would control the behaviour per-dispatch, but I guess I could just recommend that users enable that option globally.
or toggle it whenever they please with hyprctl keyword?
general:no_cursor_warpshttps://wiki.hyprland.org/Configuring/Variables/#general?
Thanks, came from Google looking for this
The current workaround is hyprctl keyword cursor:no_warps true && hyprctl dispatch focuswindow address:0x42 && hyprctl keyword cursor:no_warps false, but this is quite hacky. Would be nice to have an option in focuswindow itself or to have a separate dispatcher like focuswindowsilent (similar to movetoworkspacesilent).
Btw, my use case for this is also a taskbar widget. It is made with eww, so it uses hyprctl directly.
Yeah, trying to wrap dispatches in calls that modify globals is super-hacky and error-prone since you can't guarantee ordering when operations may happen in parallel.