diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-22 14:10:40 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-23 08:24:32 +1000 |
commit | 81e8f31cc6f284b54ab206e14af7ecbc1a9ed1bb (patch) | |
tree | ea124a94869d06edb3f98e85ecd649275e86ef91 /sway/tree/layout.c | |
parent | Merge pull request #2328 from emersion/xdg-shell-set-title (diff) | |
download | sway-81e8f31cc6f284b54ab206e14af7ecbc1a9ed1bb.tar.gz sway-81e8f31cc6f284b54ab206e14af7ecbc1a9ed1bb.tar.zst sway-81e8f31cc6f284b54ab206e14af7ecbc1a9ed1bb.zip |
Implement scratchpad
Implements the following commands:
* move scratchpad
* scratchpad show
* [criteria] scratchpad show
Also fixes these:
* Fix memory leak when executing command with criteria
(use `list_free(views)` instead of `free(views)`)
* Fix crash when running `move to` with no further arguments
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r-- | sway/tree/layout.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c index 533906fa..af37611f 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c | |||
@@ -135,6 +135,10 @@ void container_add_child(struct sway_container *parent, | |||
135 | list_add(parent->children, child); | 135 | list_add(parent->children, child); |
136 | child->parent = parent; | 136 | child->parent = parent; |
137 | container_handle_fullscreen_reparent(child, old_parent); | 137 | container_handle_fullscreen_reparent(child, old_parent); |
138 | if (old_parent) { | ||
139 | container_set_dirty(old_parent); | ||
140 | } | ||
141 | container_set_dirty(child); | ||
138 | } | 142 | } |
139 | 143 | ||
140 | struct sway_container *container_remove_child(struct sway_container *child) { | 144 | struct sway_container *container_remove_child(struct sway_container *child) { |
@@ -153,6 +157,9 @@ struct sway_container *container_remove_child(struct sway_container *child) { | |||
153 | child->parent = NULL; | 157 | child->parent = NULL; |
154 | container_notify_subtree_changed(parent); | 158 | container_notify_subtree_changed(parent); |
155 | 159 | ||
160 | container_set_dirty(parent); | ||
161 | container_set_dirty(child); | ||
162 | |||
156 | return parent; | 163 | return parent; |
157 | } | 164 | } |
158 | 165 | ||