5
0
mirror of git://git.proxmox.com/git/spiceterm.git synced 2025-01-08 21:18:03 +03: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->height = height;
spice_screen->cursor_set = 0;
qxl_worker->create_primary_surface(qxl_worker, 0, &surface);
}
@ -532,15 +534,15 @@ cursor_init()
static int
get_cursor_command(QXLInstance *qin, struct QXLCommandExt *ext)
{
//SpiceScreen *spice_screen = SPICE_CONTAINEROF(qin, SpiceScreen, qxl_instance);
static int set = 1;
SpiceScreen *spice_screen = SPICE_CONTAINEROF(qin, SpiceScreen, qxl_instance);
QXLCursorCmd *cursor_cmd;
QXLCommandExt *cmd;
if (!set) return FALSE;
set = 0;
if (spice_screen->cursor_set)
return FALSE;
spice_screen->cursor_set = 1;
cmd = calloc(sizeof(QXLCommandExt), 1);
cursor_cmd = calloc(sizeof(QXLCursorCmd), 1);

View File

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