summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Cella <guidocella91@gmail.com>2020-09-03 18:58:27 +0200
committerGuido Cella <guidocella91@gmail.com>2020-09-03 18:58:27 +0200
commit4017a27b67574bc6eb68c964ad50fde8c3c1348c (patch)
tree610347f3ae5a24ece5234506cf4540927ec380ec
parentb4d9a8662fc1e9524781af8fbcbd007705b63e8e (diff)
fix focus leave condition
needs refactoring and testing
-rw-r--r--dwl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/dwl.c b/dwl.c
index 08138a4..ed5ec5b 100644
--- a/dwl.c
+++ b/dwl.c
@@ -2067,10 +2067,11 @@ void
unmaplayersurface(LayerSurface *layersurface)
{
if (
- seat->keyboard_state.focused_surface
+ 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)
- ->current.keyboard_interactive
+ && wlr_layer_surface_v1_from_wlr_surface(seat->keyboard_state.focused_surface)
+ == layersurface->layer_surface
)
wlr_seat_keyboard_notify_clear_focus(seat);