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/input/seat.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/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 0e539b70..071ef020 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -658,7 +658,8 @@ void seat_set_focus_layer(struct sway_seat *seat, | |||
658 | struct wlr_layer_surface *layer) { | 658 | struct wlr_layer_surface *layer) { |
659 | if (!layer && seat->focused_layer) { | 659 | if (!layer && seat->focused_layer) { |
660 | seat->focused_layer = NULL; | 660 | seat->focused_layer = NULL; |
661 | struct sway_container *previous = seat_get_focus(seat); | 661 | struct sway_container *previous = |
662 | seat_get_focus_inactive(seat, &root_container); | ||
662 | if (previous) { | 663 | if (previous) { |
663 | wlr_log(L_DEBUG, "Returning focus to %p %s '%s'", previous, | 664 | wlr_log(L_DEBUG, "Returning focus to %p %s '%s'", previous, |
664 | container_type_to_str(previous->type), previous->name); | 665 | container_type_to_str(previous->type), previous->name); |