hide_cursor when-typing: do not hide cursor when buttons are pressed

This was already done for timeout based hiding.
Now the hide_cursor when-typing setting will also not hide
the cursor unless all buttons are released.
This commit is contained in:
Firgen 2023-05-07 20:29:34 +02:00
parent fd3b643d15
commit 2d1391565b

View file

@ -230,7 +230,10 @@ void cursor_notify_key_press(struct sway_cursor *cursor) {
} }
if (cursor->hide_when_typing == HIDE_WHEN_TYPING_ENABLE) { if (cursor->hide_when_typing == HIDE_WHEN_TYPING_ENABLE) {
cursor_hide(cursor); if (cursor->pressed_button_count == 0) {
// Do not hide cursor unless all buttons are released
cursor_hide(cursor);
}
} }
} }