diff --git a/server/cursor-channel.cpp b/server/cursor-channel.cpp index 6bc3e874..c5d60882 100644 --- a/server/cursor-channel.cpp +++ b/server/cursor-channel.cpp @@ -288,9 +288,9 @@ static void cursor_channel_init_client(CursorChannel *cursor, CursorChannelClien cursor->pipes_add_type(RED_PIPE_ITEM_TYPE_CURSOR_INIT); } -void cursor_channel_do_init(CursorChannel *cursor) +void CursorChannel::do_init() { - cursor_channel_init_client(cursor, NULL); + cursor_channel_init_client(this, NULL); } void cursor_channel_set_mouse_mode(CursorChannel *cursor, uint32_t mode) diff --git a/server/cursor-channel.h b/server/cursor-channel.h index 7ecccea7..0a60e03e 100644 --- a/server/cursor-channel.h +++ b/server/cursor-channel.h @@ -36,6 +36,7 @@ struct CursorChannel final: public CommonGraphicsChannel CursorChannel(RedsState *reds, uint32_t id, SpiceCoreInterfaceInternal *core=nullptr, Dispatcher *dispatcher=nullptr); ~CursorChannel(); + void do_init(); void process_cmd(RedCursorCmd *cursor_cmd); void on_connect(RedClient *client, RedStream *stream, int migration, RedChannelCapabilities *caps) override; @@ -60,7 +61,6 @@ red::shared_ptr cursor_channel_new(RedsState *server, int id, Dispatcher *dispatcher); void cursor_channel_reset (CursorChannel *cursor); -void cursor_channel_do_init (CursorChannel *cursor); void cursor_channel_set_mouse_mode(CursorChannel *cursor, uint32_t mode); #include "pop-visibility.h" diff --git a/server/red-worker.cpp b/server/red-worker.cpp index c6d1020f..9824d1d1 100644 --- a/server/red-worker.cpp +++ b/server/red-worker.cpp @@ -448,7 +448,7 @@ static void dev_create_primary_surface(RedWorker *worker, uint32_t surface_id, display->push(); } - cursor_channel_do_init(worker->cursor_channel); + worker->cursor_channel->do_init(); } static void handle_dev_create_primary_surface(void *opaque, void *payload)