diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2019-02-13 22:38:30 -0500 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2019-02-13 22:38:30 -0500 |
| commit | 60fb1431f73f8cf599f9f40adf679f14e4809502 (patch) | |
| tree | edee4245963c7a56aec24ee35197d96e59c95cd5 | |
| parent | f67162c323322456c114e05e6b8789409aaa9774 (diff) | |
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.c | 3 |
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) { // Use the hovered view - but we must be over the actual surface con = node->sway_container; - if (!con->view->surface || node == &e->con->node) { + if (!con->view->surface || node == &e->con->node + || node_has_ancestor(node, &e->con->node)) { e->target_node = NULL; e->target_edge = WLR_EDGE_NONE; return; |
