summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-02-13 22:38:30 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-02-18 15:11:48 -0500
commitf0e8c68ca77698f741d2117f6391946b5266c1ff (patch)
treeedee4245963c7a56aec24ee35197d96e59c95cd5
parentseat: allow tree focus changes while layer focused (diff)
downloadsway-f0e8c68ca77698f741d2117f6391946b5266c1ff.tar.gz
sway-f0e8c68ca77698f741d2117f6391946b5266c1ff.tar.zst
sway-f0e8c68ca77698f741d2117f6391946b5266c1ff.zip
seatop_move_tiling: do not move to descendant
In seatop_move_tiling, it is possible to cause a stack overflow by dragging a container into one of its descendants. This disables the ability to move into a descendant.
-rw-r--r--sway/input/seatop_move_tiling.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/input/seatop_move_tiling.c b/sway/input/seatop_move_tiling.c
index 422a4aa2..1e548f5a 100644
--- a/sway/input/seatop_move_tiling.c
+++ b/sway/input/seatop_move_tiling.c
@@ -164,7 +164,8 @@ static void handle_motion_postthreshold(struct sway_seat *seat) {
164 164
165 // Use the hovered view - but we must be over the actual surface 165 // Use the hovered view - but we must be over the actual surface
166 con = node->sway_container; 166 con = node->sway_container;
167 if (!con->view->surface || node == &e->con->node) { 167 if (!con->view->surface || node == &e->con->node
168 || node_has_ancestor(node, &e->con->node)) {
168 e->target_node = NULL; 169 e->target_node = NULL;
169 e->target_edge = WLR_EDGE_NONE; 170 e->target_edge = WLR_EDGE_NONE;
170 return; 171 return;