aboutsummaryrefslogtreecommitdiffstats
path: root/sway/main.c
diff options
context:
space:
mode:
authorLibravatar Dominique Martinet <asmadeus@codewreck.org>2018-05-16 12:29:30 +0900
committerLibravatar Dominique Martinet <asmadeus@codewreck.org>2018-05-16 16:50:56 +0900
commit89ae1792b58a1a29afce7e00da06593187297459 (patch)
tree770f7f47574311c5ee91f8217defb4e6ba0a41a4 /sway/main.c
parentswayidle: terminate if wl_display_dispatch failed (diff)
downloadsway-89ae1792b58a1a29afce7e00da06593187297459.tar.gz
sway-89ae1792b58a1a29afce7e00da06593187297459.tar.zst
sway-89ae1792b58a1a29afce7e00da06593187297459.zip
sway: run commands without waiting for Xwayland
Xwayland is lazy now, there is no need to wait at all
Diffstat (limited to 'sway/main.c')
-rw-r--r--sway/main.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sway/main.c b/sway/main.c
index efb674b6..e03b8e3a 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -16,6 +16,7 @@
16#include <sys/prctl.h> 16#include <sys/prctl.h>
17#endif 17#endif
18#include <wlr/util/log.h> 18#include <wlr/util/log.h>
19#include "sway/commands.h"
19#include "sway/config.h" 20#include "sway/config.h"
20#include "sway/debug.h" 21#include "sway/debug.h"
21#include "sway/server.h" 22#include "sway/server.h"
@@ -410,9 +411,18 @@ int main(int argc, char **argv) {
410 411
411 security_sanity_check(); 412 security_sanity_check();
412 413
413 // TODO: wait for server to be ready
414 // TODO: consume config->cmd_queue
415 config->active = true; 414 config->active = true;
415 // Execute commands until there are none left
416 while (config->cmd_queue->length) {
417 char *line = config->cmd_queue->items[0];
418 struct cmd_results *res = execute_command(line, NULL);
419 if (res->status != CMD_SUCCESS) {
420 wlr_log(L_ERROR, "Error on line '%s': %s", line, res->error);
421 }
422 free_cmd_results(res);
423 free(line);
424 list_del(config->cmd_queue, 0);
425 }
416 426
417 if (!terminate_request) { 427 if (!terminate_request) {
418 server_run(&server); 428 server_run(&server);