aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/input/seat.h
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-23 17:47:28 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-23 17:47:28 +1000
commit32b865e610dd937af17ce36b8c986e41f55a4627 (patch)
treebb89819988dcebe0d621c645fac35c9bfe4198d4 /include/sway/input/seat.h
parentMerge remote-tracking branch 'upstream/master' into atomic (diff)
downloadsway-32b865e610dd937af17ce36b8c986e41f55a4627.tar.gz
sway-32b865e610dd937af17ce36b8c986e41f55a4627.tar.zst
sway-32b865e610dd937af17ce36b8c986e41f55a4627.zip
Fix crash when deleting last child in a tabbed or stacked container
There was no `current` child because the container was destroyed. This makes it fall back to looking in the parent's current children list.
Diffstat (limited to 'include/sway/input/seat.h')
-rw-r--r--include/sway/input/seat.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index 1f7792ba..0e440701 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -119,6 +119,17 @@ struct sway_container *seat_get_active_child(struct sway_seat *seat,
119 struct sway_container *container); 119 struct sway_container *container);
120 120
121/** 121/**
122 * Return the immediate child of container which was most recently focused, with
123 * fallback to selecting the child in the parent's `current` (rendered) children
124 * list.
125 *
126 * This is useful for when a tabbed container and its children are destroyed but
127 * still being rendered, and we have to render an appropriate child.
128 */
129struct sway_container *seat_get_active_current_child(struct sway_seat *seat,
130 struct sway_container *container);
131
132/**
122 * Iterate over the focus-inactive children of the container calling the 133 * Iterate over the focus-inactive children of the container calling the
123 * function on each. 134 * function on each.
124 */ 135 */