src/foreign.c: refactor

This commit is contained in:
Consolatis 2023-02-01 09:27:25 +01:00 committed by Johan Malm
parent 82e9e866ec
commit 14a0c83ae0
4 changed files with 85 additions and 87 deletions

View file

@ -185,9 +185,9 @@ handle_unmap(struct wl_listener *listener, void *data)
* foreign-toplevel protocol to avoid panels and the like still showing
* them.
*/
if (view->toplevel_handle) {
wlr_foreign_toplevel_handle_v1_destroy(view->toplevel_handle);
view->toplevel_handle = NULL;
if (view->toplevel.handle) {
wlr_foreign_toplevel_handle_v1_destroy(view->toplevel.handle);
view->toplevel.handle = NULL;
}
}
@ -491,7 +491,7 @@ map(struct view *view)
view->scene_node = &tree->node;
}
if (!view->toplevel_handle) {
if (!view->toplevel.handle) {
foreign_toplevel_handle_create(view);
}