[Spice-devel] [PATCH spice-gtk 2/2] widget: Set cursor during construction
Victor Toso
victortoso at redhat.com
Fri May 19 14:01:47 UTC 2017
On Fri, May 12, 2017 at 01:00:01PM +0200, Pavel Grunt wrote:
> In a multimonitor environment can easily happen that a cursor is set
> before some of the SpiceDisplays are created. IOW the first created
> SpiceDisplay has the cursor but others don't.
>
> To avoid the issue set the initial cursor using the "cursor" property
> of the SpiceCursorChannel.
>
> Resolves:
> https://bugzilla.redhat.com/show_bug.cgi?id=1411380
Acked-by: Victor Toso <victortoso at redhat.com>
> ---
> src/spice-widget.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/spice-widget.c b/src/spice-widget.c
> index b1c8ab1..8fee34d 100644
> --- a/src/spice-widget.c
> +++ b/src/spice-widget.c
> @@ -2662,7 +2662,7 @@ static void cursor_set(SpiceCursorChannel *channel,
> d->mouse_hotspot.x,
> d->mouse_hotspot.y);
> } else
> - g_warn_if_reached();
> + return;
>
> #if HAVE_EGL
> if (egl_enabled(d))
> @@ -2970,6 +2970,7 @@ static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer data)
> spice_g_signal_connect_object(channel, "cursor-reset",
> G_CALLBACK(cursor_reset), display, 0);
> spice_channel_connect(channel);
> + cursor_set(d->cursor, NULL, display);
> return;
> }
>
> --
> 2.12.2
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170519/08938e2b/attachment.sig>
More information about the Spice-devel
mailing list