diff options
author | emersion <contact@emersion.fr> | 2018-07-18 20:00:48 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-07-18 20:00:48 +0100 |
commit | 747725b8bb35bf3fd38d442f5bb565e7a4b11ec4 (patch) | |
tree | b486f3576982ab0f94183323d44bc4bbb3a456e3 /sway/input/seat.c | |
parent | Handle xwayland override_redirect flag change (diff) | |
download | sway-747725b8bb35bf3fd38d442f5bb565e7a4b11ec4.tar.gz sway-747725b8bb35bf3fd38d442f5bb565e7a4b11ec4.tar.zst sway-747725b8bb35bf3fd38d442f5bb565e7a4b11ec4.zip |
Don't unfocus when an override redirect window is mapped
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 8ed4a3fe..eadf3b26 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -753,11 +753,11 @@ void seat_set_focus(struct sway_seat *seat, | |||
753 | } | 753 | } |
754 | 754 | ||
755 | void seat_set_focus_surface(struct sway_seat *seat, | 755 | void seat_set_focus_surface(struct sway_seat *seat, |
756 | struct wlr_surface *surface) { | 756 | struct wlr_surface *surface, bool unfocus) { |
757 | if (seat->focused_layer != NULL) { | 757 | if (seat->focused_layer != NULL) { |
758 | return; | 758 | return; |
759 | } | 759 | } |
760 | if (seat->has_focus) { | 760 | if (seat->has_focus && unfocus) { |
761 | struct sway_container *focus = seat_get_focus(seat); | 761 | struct sway_container *focus = seat_get_focus(seat); |
762 | seat_send_unfocus(focus, seat); | 762 | seat_send_unfocus(focus, seat); |
763 | seat->has_focus = false; | 763 | seat->has_focus = false; |
@@ -789,7 +789,7 @@ void seat_set_focus_layer(struct sway_seat *seat, | |||
789 | } else if (!layer || seat->focused_layer == layer) { | 789 | } else if (!layer || seat->focused_layer == layer) { |
790 | return; | 790 | return; |
791 | } | 791 | } |
792 | seat_set_focus_surface(seat, layer->surface); | 792 | seat_set_focus_surface(seat, layer->surface, true); |
793 | if (layer->layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP) { | 793 | if (layer->layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP) { |
794 | seat->focused_layer = layer; | 794 | seat->focused_layer = layer; |
795 | } | 795 | } |