xserver: Branch 'xwayland-21.1'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Mar 15 11:58:33 UTC 2021


 hw/xwayland/xwayland-input.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a8581795ed540797d47ba0bcad58f4a6cdaf1a7c
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Thu Mar 4 14:13:41 2021 +0100

    xwayland: Fix LeaveNotify for relative pointer
    
    Since commit 20c78f38, we use the relative pointer for enter/leave
    events.
    
    However, sprite_check_lost_focus() which verifies whether the pointer has
    left an Xwayland surface still explicitly check for the absolute
    pointer.
    
    As a result, no LeaveNotify event is emitted anymore now when the
    pointer crosses from an Xwayland surface to a Wayland native one.
    
    Make sure to check the last slave device against get_pointer_event() as
    well, not just the absolute pointer.
    
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
    Acked-by: Martin Peres <martin.peres at mupuf.org>
    Acked-by: Roman Gilg <subdiff at gmail.com>
    Tested-by: Roman Gilg <subdiff at gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Fixes: 20c78f38 - xwayland: use get_pointer_device() for enter/leave
                      handling too
    (cherry picked from commit d7391f383ddca5089586b4d04fede56169a1a85e)

diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index 9b7421059..26b3630c7 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -2652,7 +2652,7 @@ sprite_check_lost_focus(SpritePtr sprite, WindowPtr window)
      * devices so we can find out the xwl_seat, but those don't actually own
      * their sprite, so the match doesn't mean a lot.
      */
-    if (master->lastSlave != xwl_seat->pointer)
+    if (master->lastSlave != get_pointer_device(xwl_seat))
         return FALSE;
 
     if (xwl_seat->focus_window != NULL &&


More information about the xorg-commit mailing list