From 8925bf0d3a8923a922ea5de8427bd7a77c47d79b Mon Sep 17 00:00:00 2001 From: project-repo Date: Fri, 27 Nov 2020 13:51:44 +0100 Subject: [PATCH] Fix potential use after free Ensure that the focus is changed when calling seat_set_focus. --- seat.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/seat.c b/seat.c index 13ef04e..7095907 100644 --- a/seat.c +++ b/seat.c @@ -966,10 +966,6 @@ seat_set_focus(struct cg_seat *seat, struct cg_view *view) { } } - if(seat->seat->keyboard_state.focused_surface == view->wlr_surface) { - return; - } - #if CG_HAS_XWAYLAND if(view->type == CG_XWAYLAND_VIEW && !xwayland_view_should_manage(view)) { const struct cg_xwayland_view *xwayland_view =