xserver/hw
Morose 29d14492b1 xwayland: Fix check logic in sprite_check_lost_focus()
When the pointer leaves an X11 window, and enters a Wayland native
window, Xwayland has no idea about Wayland native windows and may
generate the wrong crossing events to another X11 window instead.

To avoid that issue, Xwayland implements its own XYToWindow() handler to
compare the Wayland focused surface with the X11 window found in the
window tree.

Commit 59ad0e6a ("xwayland: Fix use after free of cursors") changed the
logic in sprite_check_lost_focus() to use IsParent() to compare the
windows, which works when the X11 window is reparented by the window
manager, but fails in the case of an override redirect window.

To fix the issue, also check whether last_xwindow is the window itself.

Signed-off-by: Morose <chenlinxiang@kylinos.cn>
Fixes: 59ad0e6a - xwayland: Fix use after free of cursors
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit 92a00f5221)
2022-07-01 10:02:16 +02:00
..
vfb Don't install Xvfb 2022-01-18 12:09:52 +01:00
xwayland xwayland: Fix check logic in sprite_check_lost_focus() 2022-07-01 10:02:16 +02:00
meson.build Drop Xephyr / kdrive DDX 2022-01-18 12:09:52 +01:00