aboutsummaryrefslogtreecommitdiff
path: root/include/sway/input
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2018-12-17 15:37:15 -0500
committeremersion <contact@emersion.fr>2018-12-25 13:31:56 +0100
commit5fca74a1f1704281e86114b567707486875c4e05 (patch)
tree706f16acd2cc9d1f45e7378bfa1cbe8082c2472e /include/sway/input
parenta223030b70c8e360f81b820244705e007e3ac1ec (diff)
downloadsway-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.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 @@
#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;