summaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2016-01-15 21:14:25 +0100
committerJonas Ådahl <jadahl@gmail.com>2016-01-19 12:34:36 +0800
commit5ccf0476c3319f468f303d47c5d9bf25e314558c (patch)
tree4c9b28ee0d80a7369b71458a4c0ec4a1a643be76 /clients
parent9c93179023fe894e417ccd20533d72d672d976fc (diff)
downloadweston-5ccf0476c3319f468f303d47c5d9bf25e314558c.tar.gz
client: Add DnD cursors to the managed cursors list
That way we'll be able to set the corresponding pointer surface to a current DnD operation. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Diffstat (limited to 'clients')
-rw-r--r--clients/window.c16
-rw-r--r--clients/window.h3
2 files changed, 19 insertions, 0 deletions
diff --git a/clients/window.c b/clients/window.c
index 5cd33dd9..35261b63 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -1265,6 +1265,19 @@ static const char *watches[] = {
"0426c94ea35c87780ff01dc239897213"
};
+static const char *move_draggings[] = {
+ "dnd-move"
+};
+
+static const char *copy_draggings[] = {
+ "dnd-copy"
+};
+
+static const char *forbidden_draggings[] = {
+ "dnd-none",
+ "dnd-no-drop"
+};
+
struct cursor_alternatives {
const char **names;
size_t count;
@@ -1284,6 +1297,9 @@ static const struct cursor_alternatives cursors[] = {
{xterms, ARRAY_LENGTH(xterms)},
{hand1s, ARRAY_LENGTH(hand1s)},
{watches, ARRAY_LENGTH(watches)},
+ {move_draggings, ARRAY_LENGTH(move_draggings)},
+ {copy_draggings, ARRAY_LENGTH(copy_draggings)},
+ {forbidden_draggings, ARRAY_LENGTH(forbidden_draggings)},
};
static void
diff --git a/clients/window.h b/clients/window.h
index 1128d71b..349dead6 100644
--- a/clients/window.h
+++ b/clients/window.h
@@ -192,6 +192,9 @@ enum cursor_type {
CURSOR_IBEAM,
CURSOR_HAND1,
CURSOR_WATCH,
+ CURSOR_DND_MOVE,
+ CURSOR_DND_COPY,
+ CURSOR_DND_FORBIDDEN,
CURSOR_BLANK
};