aboutsummaryrefslogtreecommitdiff
path: root/cursor-shape.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-06-27 15:25:57 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-07-03 12:36:32 +0000
commitc8e13ad3938d68635693d0b0f4bf1054628e8387 (patch)
tree8c898440b07056d9e3f76e77b62f8d89248ae578 /cursor-shape.h
parentrefactor: track current xcursor using an enum, instead of a char pointer (diff)
cursor-shape: add support for server side cursor shapes
This implements support for the new cursor-shape-v1 protocol. When available, we use it, instead of client-side cursor surfaces, to select the xcursor shape. Note that we still need to keep client side pointers, for: * backward compatibility * to be able to "hide" the cursor Closes #1379
Diffstat (limited to 'cursor-shape.h')
-rw-r--r--cursor-shape.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/cursor-shape.h b/cursor-shape.h
index fb79e45a..0cb0b4d8 100644
--- a/cursor-shape.h
+++ b/cursor-shape.h
@@ -1,10 +1,14 @@
#pragma once
+#if defined(HAVE_CURSOR_SHAPE)
+#include <cursor-shape-v1.h>
+#endif
+
enum cursor_shape {
CURSOR_SHAPE_NONE,
CURSOR_SHAPE_CUSTOM,
-
CURSOR_SHAPE_HIDDEN,
+
CURSOR_SHAPE_LEFT_PTR,
CURSOR_SHAPE_TEXT,
CURSOR_SHAPE_TEXT_FALLBACK,
@@ -16,6 +20,13 @@ enum cursor_shape {
CURSOR_SHAPE_RIGHT_SIDE,
CURSOR_SHAPE_TOP_SIDE,
CURSOR_SHAPE_BOTTOM_SIDE,
+
+ CURSOR_SHAPE_COUNT,
};
const char *cursor_shape_to_string(enum cursor_shape shape);
+
+#if defined(HAVE_CURSOR_SHAPE)
+enum wp_cursor_shape_device_v1_shape cursor_shape_to_server_shape(
+ enum cursor_shape shape);
+#endif