summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/container.h1
-rw-r--r--sway/container.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/include/container.h b/include/container.h
index c2953eec..7b0bdb78 100644
--- a/include/container.h
+++ b/include/container.h
@@ -78,6 +78,7 @@ struct sway_container {
78 // Attributes that mostly views have. 78 // Attributes that mostly views have.
79 char *name; 79 char *name;
80 char *class; 80 char *class;
81 char *app_id;
81 82
82 int gaps; 83 int gaps;
83 84
diff --git a/sway/container.c b/sway/container.c
index 5bf59c26..1634cce0 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -53,6 +53,9 @@ static void free_swayc(swayc_t *cont) {
53 if (cont->class) { 53 if (cont->class) {
54 free(cont->class); 54 free(cont->class);
55 } 55 }
56 if (cont->app_id) {
57 free(cont->app_id);
58 }
56 free(cont); 59 free(cont);
57} 60}
58 61
@@ -219,6 +222,8 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle) {
219 view->name = title ? strdup(title) : NULL; 222 view->name = title ? strdup(title) : NULL;
220 const char *class = wlc_view_get_class(handle); 223 const char *class = wlc_view_get_class(handle);
221 view->class = class ? strdup(class) : NULL; 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;
222 view->visible = true; 227 view->visible = true;
223 view->is_focused = true; 228 view->is_focused = true;
224 // Setup geometry 229 // Setup geometry
@@ -253,6 +258,8 @@ swayc_t *new_floating_view(wlc_handle handle) {
253 view->name = title ? strdup(title) : NULL; 258 view->name = title ? strdup(title) : NULL;
254 const char *class = wlc_view_get_class(handle); 259 const char *class = wlc_view_get_class(handle);
255 view->class = class ? strdup(class) : NULL; 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;
256 view->visible = true; 263 view->visible = true;
257 264
258 // Set the geometry of the floating view 265 // Set the geometry of the floating view