Cleanup previous PR
This commit is contained in:
parent
738d692563
commit
3d440cf0f6
3 changed files with 31 additions and 27 deletions
|
|
@ -94,6 +94,11 @@ consumption to do the same tasks.
|
|||
Detailed list of changes
|
||||
-------------------------------------
|
||||
|
||||
0.42.0 [future]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Allow configuring the mouse unhide behavior when using :opt:`mouse_hide_wait` (:pull:`8508`)
|
||||
|
||||
0.41.1 [2025-04-03]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ cursor_active_callback(GLFWwindow *w, monotonic_t now) {
|
|||
} else if (OPT(mouse_hide.unhide_wait) > 0) {
|
||||
if (global_state.callback_os_window->mouse_activate_deadline == -1) {
|
||||
global_state.callback_os_window->mouse_activate_deadline = OPT(mouse_hide.unhide_wait) + now;
|
||||
global_state.callback_os_window->mouse_show_threshold = (int) (OPT(mouse_hide.unhide_wait) / 1e9 * OPT(mouse_hide.unhide_threshold));
|
||||
global_state.callback_os_window->mouse_show_threshold = (int) (monotonic_t_to_ms(OPT(mouse_hide.unhide_wait)) * OPT(mouse_hide.unhide_threshold));
|
||||
} else if (now < global_state.callback_os_window->mouse_activate_deadline) {
|
||||
if (global_state.callback_os_window->mouse_show_threshold > 0) {
|
||||
global_state.callback_os_window->mouse_show_threshold--;
|
||||
|
|
|
|||
|
|
@ -523,39 +523,38 @@
|
|||
further mouse events.
|
||||
|
||||
Two formats are supported:
|
||||
- "<hide-wait>"
|
||||
- "<hide-wait> <unhide-wait> <unhide-threshold> <scroll-unhide>"
|
||||
- :code:`<hide-wait>`
|
||||
- :code:`<hide-wait> <unhide-wait> <unhide-threshold> <scroll-unhide>`
|
||||
|
||||
To change the unhide behavior, the optional parameters <unhide-wait>,
|
||||
<unhide-threshold>, and <scroll-unhide> may be set.
|
||||
To change the unhide behavior, the optional parameters :code:`<unhide-wait>`,
|
||||
:code:`<unhide-threshold>`, and :code:`<scroll-unhide>` may be set.
|
||||
|
||||
<unhide-wait>:
|
||||
Waits for the specified number of seconds after mouse events before unhiding the
|
||||
mouse cursor. Set to zero to unhide mouse cursor immediately on mouse activity.
|
||||
This is useful to prevent the mouse cursor from unhiding on accidental swipes on
|
||||
the trackpad.
|
||||
:code:`<unhide-wait>`
|
||||
Waits for the specified number of seconds after mouse events before unhiding the
|
||||
mouse cursor. Set to zero to unhide mouse cursor immediately on mouse activity.
|
||||
This is useful to prevent the mouse cursor from unhiding on accidental swipes on
|
||||
the trackpad.
|
||||
|
||||
<unhide-threshold>:
|
||||
Sets the threshold of mouse activity required to unhide the mouse cursor, when
|
||||
the <unhide-wait> option is non-zero. When <unhide-wait> is zero, this has no
|
||||
effect.
|
||||
:code:`<unhide-threshold>`
|
||||
Sets the threshold of mouse activity required to unhide the mouse cursor, when
|
||||
the <unhide-wait> option is non-zero. When <unhide-wait> is zero, this has no
|
||||
effect.
|
||||
|
||||
For example, if <unhide-threshold> is 40 and <unhide-wait> is 2.5, when kitty
|
||||
detects a mouse event, it records the number of mouse events in the next 2.5
|
||||
seconds, and checks if that exceeds 40 * 2.5 = 100. If it does, then the mouse
|
||||
cursor is unhidden, otherwise nothing happens.
|
||||
|
||||
<scroll-unhide>:
|
||||
Controls what mouse events may unhide the mouse cursor. If enabled, both scroll
|
||||
and movement events may unhide the cursor. If disabled, only mouse movements can
|
||||
unhide the cursor.
|
||||
For example, if :code:`<unhide-threshold>` is 40 and :code:`<unhide-wait>` is 2.5, when kitty
|
||||
detects a mouse event, it records the number of mouse events in the next 2.5
|
||||
seconds, and checks if that exceeds 40 * 2.5 = 100. If it does, then the mouse
|
||||
cursor is unhidden, otherwise nothing happens.
|
||||
|
||||
:code:`<scroll-unhide>`
|
||||
Controls what mouse events may unhide the mouse cursor. If enabled, both scroll
|
||||
and movement events may unhide the cursor. If disabled, only mouse movements can
|
||||
unhide the cursor.
|
||||
|
||||
Examples of valid values:
|
||||
- 0.0
|
||||
- 1.0
|
||||
- -1.0
|
||||
- 0.1 3.0 40 yes
|
||||
- :code:`0.0`
|
||||
- :code:`1.0`
|
||||
- :code:`-1.0`
|
||||
- :code:`0.1 3.0 40 yes`
|
||||
'''
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue