diff options
Diffstat (limited to 'sway/container.c')
-rw-r--r-- | sway/container.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/container.c b/sway/container.c index bbe2e7b0..5bf59c26 100644 --- a/sway/container.c +++ b/sway/container.c | |||
@@ -50,6 +50,9 @@ static void free_swayc(swayc_t *cont) { | |||
50 | if (cont->name) { | 50 | if (cont->name) { |
51 | free(cont->name); | 51 | free(cont->name); |
52 | } | 52 | } |
53 | if (cont->class) { | ||
54 | free(cont->class); | ||
55 | } | ||
53 | free(cont); | 56 | free(cont); |
54 | } | 57 | } |
55 | 58 | ||
@@ -214,6 +217,8 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle) { | |||
214 | // Setup values | 217 | // Setup values |
215 | view->handle = handle; | 218 | view->handle = handle; |
216 | view->name = title ? strdup(title) : NULL; | 219 | view->name = title ? strdup(title) : NULL; |
220 | const char *class = wlc_view_get_class(handle); | ||
221 | view->class = class ? strdup(class) : NULL; | ||
217 | view->visible = true; | 222 | view->visible = true; |
218 | view->is_focused = true; | 223 | view->is_focused = true; |
219 | // Setup geometry | 224 | // Setup geometry |
@@ -246,6 +251,8 @@ swayc_t *new_floating_view(wlc_handle handle) { | |||
246 | // Setup values | 251 | // Setup values |
247 | view->handle = handle; | 252 | view->handle = handle; |
248 | view->name = title ? strdup(title) : NULL; | 253 | view->name = title ? strdup(title) : NULL; |
254 | const char *class = wlc_view_get_class(handle); | ||
255 | view->class = class ? strdup(class) : NULL; | ||
249 | view->visible = true; | 256 | view->visible = true; |
250 | 257 | ||
251 | // Set the geometry of the floating view | 258 | // Set the geometry of the floating view |