aboutsummaryrefslogtreecommitdiffstats
path: root/sway/container.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/container.c')
-rw-r--r--sway/container.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sway/container.c b/sway/container.c
index bbe2e7b0..1634cce0 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -50,6 +50,12 @@ 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 }
56 if (cont->app_id) {
57 free(cont->app_id);
58 }
53 free(cont); 59 free(cont);
54} 60}
55 61
@@ -214,6 +220,10 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle) {
214 // Setup values 220 // Setup values
215 view->handle = handle; 221 view->handle = handle;
216 view->name = title ? strdup(title) : NULL; 222 view->name = title ? strdup(title) : NULL;
223 const char *class = wlc_view_get_class(handle);
224 view->class = class ? strdup(class) : NULL;
225 const char *app_id = wlc_view_get_app_id(handle);
226 view->app_id = app_id ? strdup(app_id) : NULL;
217 view->visible = true; 227 view->visible = true;
218 view->is_focused = true; 228 view->is_focused = true;
219 // Setup geometry 229 // Setup geometry
@@ -246,6 +256,10 @@ swayc_t *new_floating_view(wlc_handle handle) {
246 // Setup values 256 // Setup values
247 view->handle = handle; 257 view->handle = handle;
248 view->name = title ? strdup(title) : NULL; 258 view->name = title ? strdup(title) : NULL;
259 const char *class = wlc_view_get_class(handle);
260 view->class = class ? strdup(class) : NULL;
261 const char *app_id = wlc_view_get_app_id(handle);
262 view->app_id = app_id ? strdup(app_id) : NULL;
249 view->visible = true; 263 view->visible = true;
250 264
251 // Set the geometry of the floating view 265 // Set the geometry of the floating view