sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 2cae0d5e3a9c5abc7c2aa2aad4021c86730b2ec9
parent bfdee1319ffc8a720d0536a752a19ba23615a1e2
Author: Ryan Dwyer <ryandwyer1@gmail.com>
Date:   Fri, 29 Mar 2019 18:29:34 +1000

Fix null pointer crash when doing tiling drag

* Create layout S[V[view view] view]
* Drag bottom view to the top
* Sway would crash when the cursor hovers the V[view view] title while
dragging

Diffstat:
Msway/input/seatop_move_tiling.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sway/input/seatop_move_tiling.c b/sway/input/seatop_move_tiling.c @@ -108,7 +108,7 @@ static void handle_motion_postthreshold(struct sway_seat *seat) { } if (node->type == N_WORKSPACE) { - // Emtpy workspace + // Empty workspace e->target_node = node; e->target_edge = WLR_EDGE_NONE; workspace_get_box(node->sway_workspace, &e->drop_box); @@ -164,7 +164,7 @@ 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 || !con->view->surface || node == &e->con->node || node_has_ancestor(node, &e->con->node)) { e->target_node = NULL; e->target_edge = WLR_EDGE_NONE;