diff options
author | S. Christoffer Eliesen <christoffer@eliesen.no> | 2015-11-22 22:09:33 +0100 |
---|---|---|
committer | S. Christoffer Eliesen <christoffer@eliesen.no> | 2015-11-24 16:00:41 +0100 |
commit | 4367e6d3e306f81e113d61842c3c542d62694577 (patch) | |
tree | c73a877a83807b4b1f707a039aaee392d14bab6d /sway/container.c | |
parent | 47c313fe3e8f66dafbebd4d00c143ac4a49c5c2d (diff) |
container: Store app_id attribute for views.
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 5bf59c26..1634cce0 100644 --- a/sway/container.c +++ b/sway/container.c @@ -53,6 +53,9 @@ static void free_swayc(swayc_t *cont) { if (cont->class) { free(cont->class); } + if (cont->app_id) { + free(cont->app_id); + } free(cont); } @@ -219,6 +222,8 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle) { view->name = title ? strdup(title) : NULL; const char *class = wlc_view_get_class(handle); view->class = class ? strdup(class) : NULL; + const char *app_id = wlc_view_get_app_id(handle); + view->app_id = app_id ? strdup(app_id) : NULL; view->visible = true; view->is_focused = true; // Setup geometry @@ -253,6 +258,8 @@ swayc_t *new_floating_view(wlc_handle handle) { view->name = title ? strdup(title) : NULL; const char *class = wlc_view_get_class(handle); view->class = class ? strdup(class) : NULL; + const char *app_id = wlc_view_get_app_id(handle); + view->app_id = app_id ? strdup(app_id) : NULL; view->visible = true; // Set the geometry of the floating view |