aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-05-21 11:24:05 +0100
committerLibravatar GitHub <noreply@github.com>2018-05-21 11:24:05 +0100
commita7adbf4b79dce4d61de1a8a71cba535aeae6bc76 (patch)
tree68210775c09209884b46b5866ca1b4530ca24324 /sway/input/seat.c
parentMerge pull request #2011 from RyanDwyer/fix-hide-edge-border-bottom (diff)
parentPre-multiply alpha for tab decorations (diff)
downloadsway-a7adbf4b79dce4d61de1a8a71cba535aeae6bc76.tar.gz
sway-a7adbf4b79dce4d61de1a8a71cba535aeae6bc76.tar.zst
sway-a7adbf4b79dce4d61de1a8a71cba535aeae6bc76.zip
Merge pull request #2005 from RyanDwyer/tabbed-layout
Implement tabbed layout
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 7d541f6e..7a3e928a 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -718,6 +718,18 @@ struct sway_container *seat_get_focus_inactive(struct sway_seat *seat,
718 return seat_get_focus_by_type(seat, container, C_TYPES); 718 return seat_get_focus_by_type(seat, container, C_TYPES);
719} 719}
720 720
721struct sway_container *seat_get_active_child(struct sway_seat *seat,
722 struct sway_container *container) {
723 struct sway_container *focus = seat_get_focus_inactive(seat, container);
724 if (!focus) {
725 return NULL;
726 }
727 while (focus->parent != container) {
728 focus = focus->parent;
729 }
730 return focus;
731}
732
721struct sway_container *sway_seat_get_focus(struct sway_seat *seat) { 733struct sway_container *sway_seat_get_focus(struct sway_seat *seat) {
722 if (!seat->has_focus) { 734 if (!seat->has_focus) {
723 return NULL; 735 return NULL;