mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-25 22:18:58 +00:00
cursor-channel: Turn cursor_channel_set_mouse_mode into method
Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Acked-by: Julien Rope <jrope@redhat.com>
This commit is contained in:
parent
f30d35a8c7
commit
e044c5bd50
@ -293,11 +293,9 @@ void CursorChannel::do_init()
|
||||
cursor_channel_init_client(this, NULL);
|
||||
}
|
||||
|
||||
void cursor_channel_set_mouse_mode(CursorChannel *cursor, uint32_t mode)
|
||||
void CursorChannel::set_mouse_mode(uint32_t mode)
|
||||
{
|
||||
spice_return_if_fail(cursor);
|
||||
|
||||
cursor->mouse_mode = mode;
|
||||
mouse_mode = mode;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -38,6 +38,7 @@ struct CursorChannel final: public CommonGraphicsChannel
|
||||
~CursorChannel();
|
||||
void do_init();
|
||||
void process_cmd(RedCursorCmd *cursor_cmd);
|
||||
void set_mouse_mode(uint32_t mode);
|
||||
void on_connect(RedClient *client, RedStream *stream, int migration,
|
||||
RedChannelCapabilities *caps) override;
|
||||
|
||||
@ -61,7 +62,6 @@ red::shared_ptr<CursorChannel> cursor_channel_new(RedsState *server, int id,
|
||||
Dispatcher *dispatcher);
|
||||
|
||||
void cursor_channel_reset (CursorChannel *cursor);
|
||||
void cursor_channel_set_mouse_mode(CursorChannel *cursor, uint32_t mode);
|
||||
|
||||
#include "pop-visibility.h"
|
||||
|
||||
|
||||
@ -707,7 +707,7 @@ static void handle_dev_set_mouse_mode(void *opaque, void *payload)
|
||||
RedWorker *worker = (RedWorker*) opaque;
|
||||
|
||||
spice_debug("mouse mode %u", msg->mode);
|
||||
cursor_channel_set_mouse_mode(worker->cursor_channel, msg->mode);
|
||||
worker->cursor_channel->set_mouse_mode(msg->mode);
|
||||
}
|
||||
|
||||
static void dev_add_memslot(RedWorker *worker, QXLDevMemSlot mem_slot)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user