aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input
diff options
context:
space:
mode:
authorLibravatar Tudor Brindus <me@tbrindus.ca>2020-11-03 00:16:15 -0500
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2020-11-11 20:43:58 -0500
commit07042486c3c4b8e7083405ba9b34b1b87f8d396d (patch)
tree5ec7b68db2acbc1c68538a08b0b039477e8f8858 /sway/input
parentAdd missing includes for wlr_input_device.h (diff)
downloadsway-07042486c3c4b8e7083405ba9b34b1b87f8d396d.tar.gz
sway-07042486c3c4b8e7083405ba9b34b1b87f8d396d.tar.zst
sway-07042486c3c4b8e7083405ba9b34b1b87f8d396d.zip
tree/container: introduce `container_is_sticky[_or_child]` functions
To query whether a container is sticky, checking `con->is_sticky` is insufficient. `container_is_floating_or_child` must also return true; this led to a lot of repetition. This commit introduces `container_is_sticky[_or_child]` functions, and switches all stickiness checks to use them. (Including ones where the container is already known to be floating, for consistency.)
Diffstat (limited to 'sway/input')
-rw-r--r--sway/input/seat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 24d7e903..2b41d1cb 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -1151,7 +1151,7 @@ void seat_set_focus(struct sway_seat *seat, struct sway_node *node) {
1151 for (int i = 0; i < new_output_last_ws->floating->length; ++i) { 1151 for (int i = 0; i < new_output_last_ws->floating->length; ++i) {
1152 struct sway_container *floater = 1152 struct sway_container *floater =
1153 new_output_last_ws->floating->items[i]; 1153 new_output_last_ws->floating->items[i];
1154 if (floater->is_sticky) { 1154 if (container_is_sticky(floater)) {
1155 container_detach(floater); 1155 container_detach(floater);
1156 workspace_add_floating(new_workspace, floater); 1156 workspace_add_floating(new_workspace, floater);
1157 --i; 1157 --i;