From 5dc94600446c8e6847aed388a87a5bd2aecaacac Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Fri, 4 Sep 2020 16:37:22 +0200 Subject: simplify focus leave condition --- dwl.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/dwl.c b/dwl.c index cd9b7ba..8ca58f6 100644 --- a/dwl.c +++ b/dwl.c @@ -2090,13 +2090,8 @@ toggleview(const Arg *arg) void unmaplayersurface(LayerSurface *layersurface) { - if ( - layersurface->layer_surface->current.keyboard_interactive - && seat->keyboard_state.focused_surface - && wlr_surface_is_layer_surface(seat->keyboard_state.focused_surface) - && wlr_layer_surface_v1_from_wlr_surface(seat->keyboard_state.focused_surface) - == layersurface->layer_surface - ) + if (layersurface->layer_surface->surface == + seat->keyboard_state.focused_surface) wlr_seat_keyboard_notify_clear_focus(seat); /* XXX recheck keyboard focus */ -- cgit v1.2.3