From f486e2fdaa1b252405a3aee90bd495b8b4c851f2 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Tue, 5 May 2020 10:38:50 +0200 Subject: [PATCH] xwayland: Remove undeeded test xwl_seat_maybe_lock_on_hidden_cursor() checks that the value of cursor_confinement_window is not NULL, yet there is no code path that could lead to this. Remove the test for cursor_confinement_window being set, it's useless. Signed-off-by: Olivier Fourdan Reviewed-by: Carlos Garnacho Reviewed-by: Peter Hutterer --- hw/xwayland/xwayland-input.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index fed78f70c..ff73c22f9 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -2823,8 +2823,7 @@ xwl_seat_maybe_lock_on_hidden_cursor(struct xwl_seat *xwl_seat) * to implement infinite panning (eg. 3D views), lock the * pointer for so the relative pointer is used. */ - if (xwl_seat->x_cursor || - !xwl_seat->cursor_confinement_window) + if (xwl_seat->x_cursor) return FALSE; if (!xwl_seat->focus_window)