This commit is contained in:
dmitry 2020-07-01 01:42:59 +03:00
parent ba0232e6f0
commit 5d96922d2c

View file

@ -715,11 +715,14 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface,
input_manager_set_focus(&view->container->node); input_manager_set_focus(&view->container->node);
} }
const char *app_id = view_get_app_id(view); const char *app_id;
if (app_id != NULL) { const char *class;
if ((app_id = view_get_app_id(view)) != NULL) {
wlr_foreign_toplevel_handle_v1_set_app_id( wlr_foreign_toplevel_handle_v1_set_app_id(
view->foreign_toplevel, app_id); view->foreign_toplevel, app_id);
} } else if ((class = view_get_class(view)) != NULL) {
wlr_foreign_toplevel_handle_v1_set_app_id(
view->foreign_toplevel, class);
} }
void view_unmap(struct sway_view *view) { void view_unmap(struct sway_view *view) {