diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-02-13 23:46:20 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-02-18 15:11:48 -0500 |
commit | ee236afb43c8da4a65b31edad0b470d4099b3cd6 (patch) | |
tree | a3876a12d29047f178ae3beb59a31d00ee6005f1 /sway/input | |
parent | seatop_move_tiling: use tab/stack parent not self (diff) | |
download | sway-ee236afb43c8da4a65b31edad0b470d4099b3cd6.tar.gz sway-ee236afb43c8da4a65b31edad0b470d4099b3cd6.tar.zst sway-ee236afb43c8da4a65b31edad0b470d4099b3cd6.zip |
seat: allow tree focus changes while layer focused
This allows the focused inactive tree node and visible workspaces to be
changed while a surface layer has focus. The layer temporarily loses
focus, the tree focus changes, and the layer gets refocused.
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/seat.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 18664d7c..df48b751 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -725,6 +725,10 @@ void seat_set_raw_focus(struct sway_seat *seat, struct sway_node *node) { | |||
725 | 725 | ||
726 | void seat_set_focus(struct sway_seat *seat, struct sway_node *node) { | 726 | void seat_set_focus(struct sway_seat *seat, struct sway_node *node) { |
727 | if (seat->focused_layer) { | 727 | if (seat->focused_layer) { |
728 | struct wlr_layer_surface_v1 *layer = seat->focused_layer; | ||
729 | seat_set_focus_layer(seat, NULL); | ||
730 | seat_set_focus(seat, node); | ||
731 | seat_set_focus_layer(seat, layer); | ||
728 | return; | 732 | return; |
729 | } | 733 | } |
730 | 734 | ||