view->scene_node = &tree->node;
}
- /*
- * Exclude unfocusable views from wlr-foreign-toplevel. These
- * views (notifications, floating toolbars, etc.) should not be
- * shown in taskbars/docks/etc.
- */
- if (!view->toplevel.handle && view_is_focusable(view)) {
- init_foreign_toplevel(view);
- }
-
if (!view->been_mapped) {
check_natural_geometry(view);
set_initial_position(view, xwayland_surface);
view_moved(view);
}
+ /*
+ * Exclude unfocusable views from wlr-foreign-toplevel. These
+ * views (notifications, floating toolbars, etc.) should not be
+ * shown in taskbars/docks/etc.
+ */
+ if (!view->toplevel.handle && view_is_focusable(view)) {
+ init_foreign_toplevel(view);
+ foreign_toplevel_update_outputs(view);
+ }
+
/* Add commit here, as xwayland map/unmap can change the wlr_surface */
wl_signal_add(&xwayland_surface->surface->events.commit, &view->commit);
view->commit.notify = handle_commit;
out:
if (client_request && view->toplevel.handle) {
wlr_foreign_toplevel_handle_v1_destroy(view->toplevel.handle);
- view->toplevel.handle = NULL;
}
}