summaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-06-03 18:46:48 +0100
committerLibravatar GitHub <noreply@github.com>2018-06-03 18:46:48 +0100
commit6d0ad6a1ed1d86863efe6eeb0d2aea4e1055d22f (patch)
tree04d00dae6ffd5b4937ca4974e58be8563f466f6d /sway
parentMerge pull request #2100 from RyanDwyer/fix-workspace-orientation (diff)
parentFix seat_get_active_child (diff)
downloadsway-6d0ad6a1ed1d86863efe6eeb0d2aea4e1055d22f.tar.gz
sway-6d0ad6a1ed1d86863efe6eeb0d2aea4e1055d22f.tar.zst
sway-6d0ad6a1ed1d86863efe6eeb0d2aea4e1055d22f.zip
Merge pull request #2099 from RyanDwyer/fix-seat-get-active-child
Fix seat_get_active_child
Diffstat (limited to 'sway')
-rw-r--r--sway/input/seat.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index d35cbeef..0e539b70 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -728,14 +728,14 @@ struct sway_container *seat_get_focus_inactive(struct sway_seat *seat,
728 728
729struct sway_container *seat_get_active_child(struct sway_seat *seat, 729struct sway_container *seat_get_active_child(struct sway_seat *seat,
730 struct sway_container *container) { 730 struct sway_container *container) {
731 struct sway_container *focus = seat_get_focus_inactive(seat, container); 731 struct sway_seat_container *current = NULL;
732 if (!focus) { 732 wl_list_for_each(current, &seat->focus_stack, link) {
733 return NULL; 733 if (current->container->parent == container &&
734 } 734 current->container->layout != L_FLOATING) {
735 while (focus->parent != container) { 735 return current->container;
736 focus = focus->parent; 736 }
737 } 737 }
738 return focus; 738 return NULL;
739} 739}
740 740
741struct sway_container *seat_get_focus(struct sway_seat *seat) { 741struct sway_container *seat_get_focus(struct sway_seat *seat) {