From dd46523b3c8da676f501e6e97c8e34f01ba6a323 Mon Sep 17 00:00:00 2001 From: Charlotte Meyer Date: Sat, 18 Jan 2020 20:01:23 +0000 Subject: [PATCH] Fix focus getting stuck on layers --- kiwmi/input/seat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kiwmi/input/seat.c b/kiwmi/input/seat.c index 81a3cbf..3032868 100644 --- a/kiwmi/input/seat.c +++ b/kiwmi/input/seat.c @@ -65,10 +65,10 @@ void seat_focus_layer(struct kiwmi_seat *seat, struct kiwmi_layer *layer) { if (!layer) { - if (seat->focused_layer) { - seat_focus_surface(seat, NULL); - seat_focus_surface( - seat, seat->focused_layer->layer_surface->surface); + seat->focused_layer = NULL; + + if (seat->focused_view) { + seat_focus_surface(seat, seat->focused_view->wlr_surface); } return;