aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rootston/desktop.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/rootston/desktop.c b/rootston/desktop.c
index 59d1e58b..44bdf365 100644
--- a/rootston/desktop.c
+++ b/rootston/desktop.c
@@ -490,6 +490,23 @@ struct roots_desktop *desktop_create(struct roots_server *server,
desktop->server = server;
desktop->config = config;
+ desktop->layout = wlr_output_layout_create();
+ desktop->layout_change.notify = handle_layout_change;
+ wl_signal_add(&desktop->layout->events.change, &desktop->layout_change);
+
+ desktop->compositor = wlr_compositor_create(server->wl_display,
+ server->renderer);
+
+ desktop->xdg_shell_v6 = wlr_xdg_shell_v6_create(server->wl_display);
+ wl_signal_add(&desktop->xdg_shell_v6->events.new_surface,
+ &desktop->xdg_shell_v6_surface);
+ desktop->xdg_shell_v6_surface.notify = handle_xdg_shell_v6_surface;
+
+ desktop->wl_shell = wlr_wl_shell_create(server->wl_display);
+ wl_signal_add(&desktop->wl_shell->events.new_surface,
+ &desktop->wl_shell_surface);
+ desktop->wl_shell_surface.notify = handle_wl_shell_surface;
+
#ifdef WLR_HAS_XWAYLAND
const char *cursor_theme = NULL;
const char *cursor_default = ROOTS_XCURSOR_DEFAULT;
@@ -510,26 +527,7 @@ struct roots_desktop *desktop_create(struct roots_server *server,
free(desktop);
return NULL;
}
-#endif
- desktop->layout = wlr_output_layout_create();
- desktop->layout_change.notify = handle_layout_change;
- wl_signal_add(&desktop->layout->events.change, &desktop->layout_change);
-
- desktop->compositor = wlr_compositor_create(server->wl_display,
- server->renderer);
-
- desktop->xdg_shell_v6 = wlr_xdg_shell_v6_create(server->wl_display);
- wl_signal_add(&desktop->xdg_shell_v6->events.new_surface,
- &desktop->xdg_shell_v6_surface);
- desktop->xdg_shell_v6_surface.notify = handle_xdg_shell_v6_surface;
-
- desktop->wl_shell = wlr_wl_shell_create(server->wl_display);
- wl_signal_add(&desktop->wl_shell->events.new_surface,
- &desktop->wl_shell_surface);
- desktop->wl_shell_surface.notify = handle_wl_shell_surface;
-
-#ifdef WLR_HAS_XWAYLAND
if (config->xwayland) {
desktop->xwayland = wlr_xwayland_create(server->wl_display,
desktop->compositor);