Implement feedback

This commit is contained in:
Luflosi 2019-04-15 09:17:31 +02:00
parent 0e0aba7a5e
commit beb90f2c55
No known key found for this signature in database
GPG Key ID: 14140F703B7D8362
4 changed files with 4 additions and 7 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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);

View File

@ -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;