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

Alon Levy alevy at redhat.com
Wed Mar 21 11:56:30 PDT 2012


On Wed, Mar 21, 2012 at 07:25:48PM +0100, Marc-André Lureau wrote:

Works for me.

ACK.

> 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
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list