aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/layout.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-07-23 07:57:48 -0400
committerGitHub <noreply@github.com>2018-07-23 07:57:48 -0400
commit0515b37dfde41cfa85529ac0f8b991a1bec749d2 (patch)
tree5f855ab05c0ec079f4487e9527f87f37c1929bf1 /sway/tree/layout.c
parent89dc047ca9558efe4efe8a81a15903cd0f0bdcba (diff)
parent12e90fa6006b2cf17a5b5983b5a6e2e70cda58d3 (diff)
Merge pull request #2323 from RyanDwyer/scratchpad
Implement scratchpad
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r--sway/tree/layout.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index 533906fa..a2be0ef3 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -42,6 +42,7 @@ void layout_init(void) {
wl_list_init(&root_container.sway_root->xwayland_unmanaged);
wl_list_init(&root_container.sway_root->drag_icons);
wl_signal_init(&root_container.sway_root->events.new_container);
+ root_container.sway_root->scratchpad = create_list();
root_container.sway_root->output_layout_change.notify =
output_layout_handle_change;
@@ -135,6 +136,10 @@ void container_add_child(struct sway_container *parent,
list_add(parent->children, child);
child->parent = parent;
container_handle_fullscreen_reparent(child, old_parent);
+ if (old_parent) {
+ container_set_dirty(old_parent);
+ }
+ container_set_dirty(child);
}
struct sway_container *container_remove_child(struct sway_container *child) {
@@ -153,6 +158,9 @@ struct sway_container *container_remove_child(struct sway_container *child) {
child->parent = NULL;
container_notify_subtree_changed(parent);
+ container_set_dirty(parent);
+ container_set_dirty(child);
+
return parent;
}