aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/input/cursor.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/input/cursor.h')
-rw-r--r--include/sway/input/cursor.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h
index 4c130faf..ca3c6f4b 100644
--- a/include/sway/input/cursor.h
+++ b/include/sway/input/cursor.h
@@ -6,6 +6,7 @@
6#include <wlr/types/wlr_pointer_gestures_v1.h> 6#include <wlr/types/wlr_pointer_gestures_v1.h>
7#include <wlr/types/wlr_surface.h> 7#include <wlr/types/wlr_surface.h>
8#include "sway/input/seat.h" 8#include "sway/input/seat.h"
9#include "config.h"
9 10
10#define SWAY_CURSOR_PRESSED_BUTTONS_CAP 32 11#define SWAY_CURSOR_PRESSED_BUTTONS_CAP 32
11 12
@@ -68,6 +69,10 @@ struct sway_cursor {
68 69
69 struct wl_event_source *hide_source; 70 struct wl_event_source *hide_source;
70 bool hidden; 71 bool hidden;
72 // This field is just a cache of the field in seat_config in order to avoid
73 // costly seat_config lookups on every keypress. HIDE_WHEN_TYPING_DEFAULT
74 // indicates that there is no cached value.
75 enum seat_config_hide_cursor_when_typing hide_when_typing;
71 76
72 size_t pressed_button_count; 77 size_t pressed_button_count;
73}; 78};
@@ -94,6 +99,7 @@ void cursor_handle_activity(struct sway_cursor *cursor,
94 struct wlr_input_device *device); 99 struct wlr_input_device *device);
95void cursor_unhide(struct sway_cursor *cursor); 100void cursor_unhide(struct sway_cursor *cursor);
96int cursor_get_timeout(struct sway_cursor *cursor); 101int cursor_get_timeout(struct sway_cursor *cursor);
102void cursor_notify_key_press(struct sway_cursor *cursor);
97 103
98void dispatch_cursor_button(struct sway_cursor *cursor, 104void dispatch_cursor_button(struct sway_cursor *cursor,
99 struct wlr_input_device *device, uint32_t time_msec, uint32_t button, 105 struct wlr_input_device *device, uint32_t time_msec, uint32_t button,