From beb90f2c550676db9c4b7170ba5fd9617540ece0 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Mon, 15 Apr 2019 09:17:31 +0200 Subject: [PATCH] Implement feedback --- kitty/config_data.py | 6 ++---- kitty/keys.c | 2 +- kitty/state.c | 1 - kitty/state.h | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/kitty/config_data.py b/kitty/config_data.py index 78800d994..ba99087e4 100644 --- a/kitty/config_data.py +++ b/kitty/config_data.py @@ -445,11 +445,9 @@ o('click_interval', -1.0, option_type=float, long_text=_(''' The interval between successive clicks to detect double/triple clicks (in seconds). Negative numbers will use the system default instead, if available, or fallback to 0.5.''')) -o('mouse_hide_wait', 3.0, option_type=positive_float, long_text=_(''' +o('mouse_hide_wait', 3.0, option_type=float, long_text=_(''' Hide mouse cursor after the specified number of seconds -of the mouse not being used. Set to zero to disable mouse cursor hiding.''')) - -o('mouse_hide_key', True, long_text=_('''TODO''')) +of the mouse not being used. Set to zero to disable mouse cursor hiding. TODO''')) o('focus_follows_mouse', False, long_text=_(''' Set the active window to the window under the mouse when diff --git a/kitty/keys.c b/kitty/keys.c index 60017ed5e..ab80ebd66 100644 --- a/kitty/keys.c +++ b/kitty/keys.c @@ -180,7 +180,7 @@ on_key_input(int key, int scancode, int action, int mods, const char* text, int bool ok_to_send = action == GLFW_PRESS || action == GLFW_REPEAT || screen->modes.mEXTENDED_KEYBOARD; if (ok_to_send) { if (has_text) { - if (OPT(mouse_hide_key)) hide_mouse(global_state.callback_os_window); + if (OPT(mouse_hide_wait) < 0) hide_mouse(global_state.callback_os_window); schedule_write_to_child(w->id, 1, text, strlen(text)); debug("sent text to child\n"); } else { diff --git a/kitty/state.c b/kitty/state.c index 786b0b2da..7375e0088 100644 --- a/kitty/state.c +++ b/kitty/state.c @@ -382,7 +382,6 @@ PYWRAP1(set_options) { S(url_style, PyLong_AsUnsignedLong); S(tab_bar_edge, PyLong_AsLong); S(mouse_hide_wait, PyFloat_AsDouble); - S(mouse_hide_key, PyObject_IsTrue); S(wheel_scroll_multiplier, PyFloat_AsDouble); S(touch_scroll_multiplier, PyFloat_AsDouble); S(open_url_modifiers, convert_mods); diff --git a/kitty/state.h b/kitty/state.h index bb3f74395..182a6ff63 100644 --- a/kitty/state.h +++ b/kitty/state.h @@ -14,7 +14,7 @@ typedef enum { LEFT_EDGE, TOP_EDGE, RIGHT_EDGE, BOTTOM_EDGE } Edge; typedef struct { double visual_bell_duration, cursor_blink_interval, cursor_stop_blinking_after, mouse_hide_wait, click_interval, wheel_scroll_multiplier, touch_scroll_multiplier; - bool mouse_hide_key, enable_audio_bell; + bool enable_audio_bell; CursorShape cursor_shape; unsigned int open_url_modifiers; unsigned int rectangle_select_modifiers;