summaryrefslogtreecommitdiffstats
path: root/server/cursor-channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'server/cursor-channel.c')
-rw-r--r--server/cursor-channel.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/server/cursor-channel.c b/server/cursor-channel.c
index eef0121a..48f9ad37 100644
--- a/server/cursor-channel.c
+++ b/server/cursor-channel.c
@@ -19,6 +19,21 @@
#include "common/generated_server_marshallers.h"
#include "cursor-channel.h"
+struct CursorChannel {
+ CommonChannel common; // Must be the first thing
+
+ CursorItem *item;
+ int cursor_visible;
+ SpicePoint16 cursor_position;
+ uint16_t cursor_trail_length;
+ uint16_t cursor_trail_frequency;
+ uint32_t mouse_mode;
+
+#ifdef RED_STATISTICS
+ StatNodeRef stat;
+#endif
+};
+
#define RCC_TO_CCC(rcc) SPICE_CONTAINEROF((rcc), CursorChannelClient, common.base)
#define CLIENT_CURSOR_CACHE
@@ -364,7 +379,7 @@ CursorChannel* cursor_channel_new(RedWorker *worker)
};
spice_info("create cursor channel");
- channel = red_worker_new_channel(worker, sizeof(CursorChannel),
+ channel = red_worker_new_channel(worker, sizeof(CursorChannel), "cursor_channel",
SPICE_CHANNEL_CURSOR, 0,
&cbs, red_channel_client_handle_message);
@@ -460,3 +475,10 @@ void cursor_channel_reset(CursorChannel *cursor)
}
}
}
+
+void cursor_channel_set_mouse_mode(CursorChannel *cursor, uint32_t mode)
+{
+ spice_return_if_fail(cursor);
+
+ cursor->mouse_mode = mode;
+}