diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-04 11:31:07 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-04 11:31:07 +1000 |
commit | 9253278328524e4f483a66aa54ed11fd8538ace8 (patch) | |
tree | 8a43d800d5a5ba840af923517bedc138b971f0da /sway/desktop/layer_shell.c | |
parent | Restore focus when unmapping unmanaged xwayland surfaces (diff) | |
download | sway-9253278328524e4f483a66aa54ed11fd8538ace8.tar.gz sway-9253278328524e4f483a66aa54ed11fd8538ace8.tar.zst sway-9253278328524e4f483a66aa54ed11fd8538ace8.zip |
Restore focus when unmapping layer shell surfaces
Diffstat (limited to 'sway/desktop/layer_shell.c')
-rw-r--r-- | sway/desktop/layer_shell.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) { | |||
257 | } | 257 | } |
258 | output_damage_surface(output, sway_layer->geo.x, sway_layer->geo.y, | 258 | output_damage_surface(output, sway_layer->geo.x, sway_layer->geo.y, |
259 | sway_layer->layer_surface->surface, true); | 259 | sway_layer->layer_surface->surface, true); |
260 | |||
261 | struct sway_seat *seat = input_manager_current_seat(input_manager); | ||
262 | if (seat->focused_layer == sway_layer->layer_surface) { | ||
263 | seat_set_focus_layer(seat, NULL); | ||
264 | } | ||
260 | } | 265 | } |
261 | 266 | ||
262 | static void handle_destroy(struct wl_listener *listener, void *data) { | 267 | static void handle_destroy(struct wl_listener *listener, void *data) { |