[Spice-commits] gtk/spice-widget.c

Marc-André Lureau elmarco at kemper.freedesktop.org
Wed Mar 21 12:02:52 PDT 2012


 gtk/spice-widget.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 86e57864b2b7696a48603823797f597ce6a47494
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Wed Mar 21 19:20:27 2012 +0100

    Fix cursor not being shown in client mode in some cases
    
    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.

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 {


More information about the Spice-commits mailing list