mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 18:01:29 +00:00
container: Store app_id attribute for views.
This commit is contained in:
parent
47c313fe3e
commit
4367e6d3e3
|
@ -78,6 +78,7 @@ struct sway_container {
|
||||||
// Attributes that mostly views have.
|
// Attributes that mostly views have.
|
||||||
char *name;
|
char *name;
|
||||||
char *class;
|
char *class;
|
||||||
|
char *app_id;
|
||||||
|
|
||||||
int gaps;
|
int gaps;
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,9 @@ static void free_swayc(swayc_t *cont) {
|
||||||
if (cont->class) {
|
if (cont->class) {
|
||||||
free(cont->class);
|
free(cont->class);
|
||||||
}
|
}
|
||||||
|
if (cont->app_id) {
|
||||||
|
free(cont->app_id);
|
||||||
|
}
|
||||||
free(cont);
|
free(cont);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,6 +222,8 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle) {
|
||||||
view->name = title ? strdup(title) : NULL;
|
view->name = title ? strdup(title) : NULL;
|
||||||
const char *class = wlc_view_get_class(handle);
|
const char *class = wlc_view_get_class(handle);
|
||||||
view->class = class ? strdup(class) : NULL;
|
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->visible = true;
|
||||||
view->is_focused = true;
|
view->is_focused = true;
|
||||||
// Setup geometry
|
// Setup geometry
|
||||||
|
@ -253,6 +258,8 @@ swayc_t *new_floating_view(wlc_handle handle) {
|
||||||
view->name = title ? strdup(title) : NULL;
|
view->name = title ? strdup(title) : NULL;
|
||||||
const char *class = wlc_view_get_class(handle);
|
const char *class = wlc_view_get_class(handle);
|
||||||
view->class = class ? strdup(class) : NULL;
|
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->visible = true;
|
||||||
|
|
||||||
// Set the geometry of the floating view
|
// Set the geometry of the floating view
|
||||||
|
|
Loading…
Reference in a new issue