[Spice-devel] [PATCH spice-gtk] Fix cursor not being shown in client mode in some cases

Marc-André Lureau marcandre.lureau at gmail.com
Wed Mar 21 11:25:48 PDT 2012


The following seems to happen:
- cursor-hide (for all cursor/display channels)
- cursor-set (for all cursor/display channels)

All cursor/display channels receive cursor-set events when the cursor
is changed, however, only current display cursor should be drawn in
server-mode. How to know which display?

So it will wait until cursor-move to draw it in server-mode on the
right display.

In the case of client-mode cursor, it doesn't matter since it will
depend on which client display the pointer is, so it can be changed
immediately.
---
 gtk/spice-widget.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index 2e5ce41..db53928 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -1618,8 +1618,8 @@ static void cursor_set(SpiceCursorChannel *channel,
     } else
         g_warn_if_reached();
 
-    if (d->show_cursor) {
-        /* keep hidden cursor */
+    if (d->show_cursor && d->mouse_mode == SPICE_MOUSE_MODE_SERVER) {
+        /* keep hidden cursor, will be shown in cursor_move() */
         gdk_cursor_unref(d->show_cursor);
         d->show_cursor = cursor;
     } else {
-- 
1.7.7.6



More information about the Spice-devel mailing list