]> git.proxmox.com Git - spiceterm.git/commitdiff
reset cursor after resize
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 9 Oct 2013 11:09:51 +0000 (13:09 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 9 Oct 2013 11:09:51 +0000 (13:09 +0200)
screen.c
spiceterm.h

index 5c908c9bb16235c094f0708414821c0bda0cb89a..451d119075c627b0ea96aad33afcb9e22656876b 100644 (file)
--- a/screen.c
+++ b/screen.c
@@ -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);
index a8d27d1f36cc3b0d2f075ca64dc7f739a46076d6..b2c764c7922cb6b505a8d0d8b92a4980ec6f70f8 100644 (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);