summaryrefslogtreecommitdiff
path: root/gtk/spice-widget-cairo.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2014-10-24 18:33:14 +0200
committerMarc-André Lureau <marcandre.lureau@redhat.com>2014-10-27 10:26:30 +0100
commitd9959f6f5a43fef55d6b8a4eaec2be9fcc853fe7 (patch)
tree67a38ce1e92fd0e2d21c102bae06fbfefe1993b9 /gtk/spice-widget-cairo.c
parent7630c0dda9121978f76bdac621319d9ad96f1395 (diff)
gtk: hide cursor when ungrabbed
Let's avoid confusion of multiple pointers visible on the client desktop: hide the guest pointer if the spice client doesn't have the grab, display it again when the grab is taken back.
Diffstat (limited to 'gtk/spice-widget-cairo.c')
-rw-r--r--gtk/spice-widget-cairo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/spice-widget-cairo.c b/gtk/spice-widget-cairo.c
index 1c7b358..05d708f 100644
--- a/gtk/spice-widget-cairo.c
+++ b/gtk/spice-widget-cairo.c
@@ -118,7 +118,7 @@ void spicex_draw_event(SpiceDisplay *display, cairo_t *cr)
if (d->mouse_mode == SPICE_MOUSE_MODE_SERVER &&
d->mouse_guest_x != -1 && d->mouse_guest_y != -1 &&
- !d->show_cursor) {
+ !d->show_cursor && d->mouse_grab_active) {
GdkPixbuf *image = d->mouse_pixbuf;
if (image != NULL) {
gdk_cairo_set_source_pixbuf(cr, image,