aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/input/cursor.h
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-12-17 15:37:15 -0500
committerLibravatar emersion <contact@emersion.fr>2018-12-25 13:31:56 +0100
commit5fca74a1f1704281e86114b567707486875c4e05 (patch)
tree706f16acd2cc9d1f45e7378bfa1cbe8082c2472e /include/sway/input/cursor.h
parentChange mouse buttons to x11 map and libevdev names (diff)
downloadsway-5fca74a1f1704281e86114b567707486875c4e05.tar.gz
sway-5fca74a1f1704281e86114b567707486875c4e05.tar.zst
sway-5fca74a1f1704281e86114b567707486875c4e05.zip
Implement hide_cursor <timeout> command
Allows the cursor to be hidden after a specified timeout in milliseconds
Diffstat (limited to 'include/sway/input/cursor.h')
-rw-r--r--include/sway/input/cursor.h7
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 @@
1#ifndef _SWAY_INPUT_CURSOR_H 1#ifndef _SWAY_INPUT_CURSOR_H
2#define _SWAY_INPUT_CURSOR_H 2#define _SWAY_INPUT_CURSOR_H
3#include <stdbool.h>
3#include <stdint.h> 4#include <stdint.h>
5#include <wlr/types/wlr_surface.h>
4#include "sway/input/seat.h" 6#include "sway/input/seat.h"
5 7
6#define SWAY_CURSOR_PRESSED_BUTTONS_CAP 32 8#define SWAY_CURSOR_PRESSED_BUTTONS_CAP 32
@@ -21,6 +23,8 @@ struct sway_cursor {
21 23
22 const char *image; 24 const char *image;
23 struct wl_client *image_client; 25 struct wl_client *image_client;
26 struct wlr_surface *image_surface;
27 int hotspot_x, hotspot_y;
24 28
25 struct wl_listener motion; 29 struct wl_listener motion;
26 struct wl_listener motion_absolute; 30 struct wl_listener motion_absolute;
@@ -38,6 +42,9 @@ struct sway_cursor {
38 42
39 struct wl_listener request_set_cursor; 43 struct wl_listener request_set_cursor;
40 44
45 struct wl_event_source *hide_source;
46 bool hidden;
47
41 // Mouse binding state 48 // Mouse binding state
42 uint32_t pressed_buttons[SWAY_CURSOR_PRESSED_BUTTONS_CAP]; 49 uint32_t pressed_buttons[SWAY_CURSOR_PRESSED_BUTTONS_CAP];
43 size_t pressed_button_count; 50 size_t pressed_button_count;