2
0
mirror of git://git.proxmox.com/git/spiceterm.git synced 2025-08-22 10:17:06 +00:00

reset cursor after resize

This commit is contained in:
Dietmar Maurer 2013-10-09 13:09:51 +02:00
parent e420a6d91d
commit 6508981fdd
2 changed files with 9 additions and 5 deletions

View File

@ -370,6 +370,8 @@ create_primary_surface(SpiceScreen *spice_screen, uint32_t width,
spice_screen->width = width; spice_screen->width = width;
spice_screen->height = height; spice_screen->height = height;
spice_screen->cursor_set = 0;
qxl_worker->create_primary_surface(qxl_worker, 0, &surface); qxl_worker->create_primary_surface(qxl_worker, 0, &surface);
} }
@ -532,15 +534,15 @@ cursor_init()
static int static int
get_cursor_command(QXLInstance *qin, struct QXLCommandExt *ext) get_cursor_command(QXLInstance *qin, struct QXLCommandExt *ext)
{ {
//SpiceScreen *spice_screen = SPICE_CONTAINEROF(qin, SpiceScreen, qxl_instance); SpiceScreen *spice_screen = SPICE_CONTAINEROF(qin, SpiceScreen, qxl_instance);
static int set = 1;
QXLCursorCmd *cursor_cmd; QXLCursorCmd *cursor_cmd;
QXLCommandExt *cmd; QXLCommandExt *cmd;
if (!set) return FALSE; if (spice_screen->cursor_set)
set = 0; return FALSE;
spice_screen->cursor_set = 1;
cmd = calloc(sizeof(QXLCommandExt), 1); cmd = calloc(sizeof(QXLCommandExt), 1);
cursor_cmd = calloc(sizeof(QXLCursorCmd), 1); cursor_cmd = calloc(sizeof(QXLCursorCmd), 1);

View File

@ -59,6 +59,8 @@ struct SpiceScreen {
//cache for glyphs bitmaps //cache for glyphs bitmaps
GHashTable *image_cache; GHashTable *image_cache;
gboolean cursor_set;
// callbacks // callbacks
void (*on_client_connected)(SpiceScreen *spice_screen); void (*on_client_connected)(SpiceScreen *spice_screen);
void (*on_client_disconnected)(SpiceScreen *spice_screen); void (*on_client_disconnected)(SpiceScreen *spice_screen);