Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

focuswindow without mouse cursor capture

Open pdf opened this issue 1 year ago • 6 comments
trafficstars

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.

pdf avatar Dec 25 '23 14:12 pdf

general:no_cursor_warps https://wiki.hyprland.org/Configuring/Variables/#general

?

vaxerski avatar Dec 25 '23 15:12 vaxerski

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.

pdf avatar Dec 25 '23 21:12 pdf

or toggle it whenever they please with hyprctl keyword?

vaxerski avatar Dec 25 '23 21:12 vaxerski

general:no_cursor_warps https://wiki.hyprland.org/Configuring/Variables/#general

?

Thanks, came from Google looking for this

catvec avatar Dec 25 '23 22:12 catvec

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.

Azarattum avatar May 21 '24 06:05 Azarattum

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.

pdf avatar May 21 '24 06:05 pdf