aboutsummaryrefslogtreecommitdiffstats
path: root/sway/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/server.c')
-rw-r--r--sway/server.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/sway/server.c b/sway/server.c
index 050ddf56..e47cc5b6 100644
--- a/sway/server.c
+++ b/sway/server.c
@@ -19,27 +19,11 @@
19#include <wlr/util/log.h> 19#include <wlr/util/log.h>
20// TODO WLR: make Xwayland optional 20// TODO WLR: make Xwayland optional
21#include <wlr/xwayland.h> 21#include <wlr/xwayland.h>
22#include "sway/commands.h"
23#include "sway/config.h" 22#include "sway/config.h"
24#include "sway/input/input-manager.h" 23#include "sway/input/input-manager.h"
25#include "sway/server.h" 24#include "sway/server.h"
26#include "sway/tree/layout.h" 25#include "sway/tree/layout.h"
27 26
28static void server_ready(struct wl_listener *listener, void *data) {
29 wlr_log(L_DEBUG, "Compositor is ready, executing cmds in queue");
30 // Execute commands until there are none left
31 config->active = true;
32 while (config->cmd_queue->length) {
33 char *line = config->cmd_queue->items[0];
34 struct cmd_results *res = execute_command(line, NULL);
35 if (res->status != CMD_SUCCESS) {
36 wlr_log(L_ERROR, "Error on line '%s': %s", line, res->error);
37 }
38 free_cmd_results(res);
39 free(line);
40 list_del(config->cmd_queue, 0);
41 }
42}
43 27
44bool server_init(struct sway_server *server) { 28bool server_init(struct sway_server *server) {
45 wlr_log(L_DEBUG, "Initializing Wayland server"); 29 wlr_log(L_DEBUG, "Initializing Wayland server");
@@ -93,10 +77,6 @@ bool server_init(struct sway_server *server) {
93 wl_signal_add(&server->xwayland->events.new_surface, 77 wl_signal_add(&server->xwayland->events.new_surface,
94 &server->xwayland_surface); 78 &server->xwayland_surface);
95 server->xwayland_surface.notify = handle_xwayland_surface; 79 server->xwayland_surface.notify = handle_xwayland_surface;
96 wl_signal_add(&server->xwayland->events.ready,
97 &server->xwayland_ready);
98 // TODO: call server_ready now if xwayland is not enabled
99 server->xwayland_ready.notify = server_ready;
100 80
101 // TODO: configurable cursor theme and size 81 // TODO: configurable cursor theme and size
102 server->xcursor_manager = wlr_xcursor_manager_create(NULL, 24); 82 server->xcursor_manager = wlr_xcursor_manager_create(NULL, 24);