summaryrefslogtreecommitdiffstats
path: root/sway/container.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-08-16 08:10:56 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-08-16 08:10:56 -0400
commitae536c21d3bcab7758f4a47cbf4556c518245a7b (patch)
treecc8ffeb1d52d770548fd99a9d0b7bbef18f90ead /sway/container.c
parentMerge pull request #38 from taiyu-len/master (diff)
downloadsway-ae536c21d3bcab7758f4a47cbf4556c518245a7b.tar.gz
sway-ae536c21d3bcab7758f4a47cbf4556c518245a7b.tar.zst
sway-ae536c21d3bcab7758f4a47cbf4556c518245a7b.zip
Revert "get/set_userdata stores swayc_t *, fixed memory leak, minor changes."
Diffstat (limited to 'sway/container.c')
-rw-r--r--sway/container.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sway/container.c b/sway/container.c
index ff9c983a..98941b2c 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -31,9 +31,6 @@ static void free_swayc(swayc_t *c) {
31 } 31 }
32 remove_child(c->parent, c); 32 remove_child(c->parent, c);
33 } 33 }
34 if (c->name) {
35 free(c->name);
36 }
37 free(c); 34 free(c);
38} 35}
39 36
@@ -54,10 +51,8 @@ swayc_t *new_output(wlc_handle handle) {
54 output->height = size->h; 51 output->height = size->h;
55 output->handle = handle; 52 output->handle = handle;
56 53
57 //link this to handler
58 wlc_handle_set_user_data(handle, output);
59
60 add_child(&root_container, output); 54 add_child(&root_container, output);
55
61 //TODO something with this 56 //TODO something with this
62 int total_width = 0; 57 int total_width = 0;
63 container_map(&root_container, add_output_widths, &total_width); 58 container_map(&root_container, add_output_widths, &total_width);
@@ -140,8 +135,6 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle) {
140 view->name = strdup(title); 135 view->name = strdup(title);
141 view->visible = true; 136 view->visible = true;
142 137
143 //Link view to handle
144 wlc_handle_set_user_data(handle, view);
145 //Case of focused workspace, just create as child of it 138 //Case of focused workspace, just create as child of it
146 if (sibling->type == C_WORKSPACE) { 139 if (sibling->type == C_WORKSPACE) {
147 add_child(sibling, view); 140 add_child(sibling, view);