[Spice-devel] [PATCH spice-gtk 03/11] Correctly hide client pointer (in server mode)

Marc-André Lureau marcandre.lureau at gmail.com
Thu Dec 8 06:12:50 PST 2011


The hide cursor event happen when the widget is not yet
realized. Forcing realize may fail if the widget is not yet embedded
for example. Instead, let's update the cursor whenever there is a
draw().
---
 gtk/spice-widget.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index 816a3e2..5606980 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -740,6 +740,7 @@ static gboolean draw_event(GtkWidget *widget, cairo_t *cr)
     }
 
     spicex_draw_event(display, cr);
+    update_mouse_pointer(display);
 
     return true;
 }
@@ -758,6 +759,8 @@ static gboolean expose_event(GtkWidget *widget, GdkEventExpose *expose)
     }
 
     spicex_expose_event(display, expose);
+    update_mouse_pointer(display);
+
     return true;
 }
 #endif
-- 
1.7.7.3



More information about the Spice-devel mailing list