diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2018-12-17 15:37:15 -0500 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-12-25 13:31:56 +0100 |
commit | 5fca74a1f1704281e86114b567707486875c4e05 (patch) | |
tree | 706f16acd2cc9d1f45e7378bfa1cbe8082c2472e /include/sway/input | |
parent | a223030b70c8e360f81b820244705e007e3ac1ec (diff) | |
download | sway-5fca74a1f1704281e86114b567707486875c4e05.tar.xz |
Implement hide_cursor <timeout> command
Allows the cursor to be hidden after a specified timeout in
milliseconds
Diffstat (limited to 'include/sway/input')
-rw-r--r-- | include/sway/input/cursor.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h index f7e82721..8677f1b1 100644 --- a/include/sway/input/cursor.h +++ b/include/sway/input/cursor.h @@ -1,6 +1,8 @@ #ifndef _SWAY_INPUT_CURSOR_H #define _SWAY_INPUT_CURSOR_H +#include <stdbool.h> #include <stdint.h> +#include <wlr/types/wlr_surface.h> #include "sway/input/seat.h" #define SWAY_CURSOR_PRESSED_BUTTONS_CAP 32 @@ -21,6 +23,8 @@ struct sway_cursor { const char *image; struct wl_client *image_client; + struct wlr_surface *image_surface; + int hotspot_x, hotspot_y; struct wl_listener motion; struct wl_listener motion_absolute; @@ -38,6 +42,9 @@ struct sway_cursor { struct wl_listener request_set_cursor; + struct wl_event_source *hide_source; + bool hidden; + // Mouse binding state uint32_t pressed_buttons[SWAY_CURSOR_PRESSED_BUTTONS_CAP]; size_t pressed_button_count; |