diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-02 15:37:56 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-05 18:01:43 +1000 |
commit | 4e0452fce3bfc96db6f6f2951794cbb26e75ccd7 (patch) | |
tree | dfc9d82c97b051ec1829f918829a1f3c852c5131 /sway/input | |
parent | 93ff7879f16c5e31c18a37e87b23ee5dcb5a584b (diff) | |
download | sway-4e0452fce3bfc96db6f6f2951794cbb26e75ccd7.tar.xz |
Fix scratchpad related crashes
* Was crashing when a view was moved to the scratchpad (prev focus had
no parent).
* Was crashing when a hidden scratchpad view unmaps because it has no
workspace.
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/seat.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 502ed5ac..92d9d7ec 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -618,7 +618,10 @@ void seat_set_focus_warp(struct sway_seat *seat, struct sway_node *node, if (last_focus) { seat_send_unfocus(last_focus, seat); node_set_dirty(last_focus); - node_set_dirty(node_get_parent(last_focus)); + struct sway_node *parent = node_get_parent(last_focus); + if (parent) { + node_set_dirty(parent); + } } // Put the container parents on the focus stack, then the workspace, then |