From 9253278328524e4f483a66aa54ed11fd8538ace8 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Mon, 4 Jun 2018 11:31:07 +1000 Subject: Restore focus when unmapping layer shell surfaces --- sway/desktop/layer_shell.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sway/desktop/layer_shell.c') diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c index b60aa487..2d355b74 100644 --- a/sway/desktop/layer_shell.c +++ b/sway/desktop/layer_shell.c @@ -257,6 +257,11 @@ static void unmap(struct sway_layer_surface *sway_layer) { } output_damage_surface(output, sway_layer->geo.x, sway_layer->geo.y, sway_layer->layer_surface->surface, true); + + struct sway_seat *seat = input_manager_current_seat(input_manager); + if (seat->focused_layer == sway_layer->layer_surface) { + seat_set_focus_layer(seat, NULL); + } } static void handle_destroy(struct wl_listener *listener, void *data) { -- cgit v1.2.3-54-g00ecf