fix focus leave condition

needs refactoring and testing
main
Guido Cella 2020-09-03 18:58:27 +02:00
parent b4d9a8662f
commit 4017a27b67
1 changed files with 4 additions and 3 deletions

7
dwl.c
View File

@ -2067,10 +2067,11 @@ void
unmaplayersurface(LayerSurface *layersurface) unmaplayersurface(LayerSurface *layersurface)
{ {
if ( 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_surface_is_layer_surface(seat->keyboard_state.focused_surface)
&& !wlr_layer_surface_v1_from_wlr_surface(seat->keyboard_state.focused_surface) && wlr_layer_surface_v1_from_wlr_surface(seat->keyboard_state.focused_surface)
->current.keyboard_interactive == layersurface->layer_surface
) )
wlr_seat_keyboard_notify_clear_focus(seat); wlr_seat_keyboard_notify_clear_focus(seat);