[PATCH xwayland] xwayland: Always update the wl_pointer cursor on pointer focus
Daniel Stone
daniel at fooishbar.org
Mon Sep 21 02:19:59 PDT 2015
Hi,
On 21 September 2015 at 09:52, Jonas Ådahl <jadahl at gmail.com> wrote:
> In Wayland, a client (in this case XWayland) should set the cursor
> surface when it receives pointer focus. Not doing this will leave the
> curser at whatever it was previously.
>
> When running on XWayland, the X server will not be the entity that controls
> what actual pointer cursor is displayed, and it wont be notified about the
> pointer cursor changes done by the Wayland compositor. This causes X11 clients
> running via XWayland to end up with incorrect pointer cursors because the X
> server believes that, if the cursor was previously set to the cursor C, if we
> receive Wayland pointer focus over window W which also has the pointer cursor
> C, we do not need to update it. This will cause us to end up with the wrong
> cursor if cursor C was not the same one that was already set by the Wayland
> compositor.
>
> This patch introduces new API to make it possible for a XWayland to trigger
> resetting of the pointer cursor sprite through the various layers that
> deals with that. The new function that does this is InvalidateCursor().
>
> XWayland will now call this function upon receiving pointer focus,
> making sure that subsequent calls will trigger resetting of the pointer
> cursor sprite.
>
> Signed-off-by: Jonas Ådahl <jadahl at gmail.com>
Reviewed-by: Daniel Stone <daniels at collabora.com>
Cheers,
Daniel
More information about the xorg-devel
mailing list