diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-13 15:52:16 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-13 15:52:16 -0400 |
commit | 3a3c50135fabc6a23f7b130effef9b642e54bf3c (patch) | |
tree | d22fbf61f38f7c8987df51cf5f23b60e5f95e3b3 /sway/handlers.c | |
parent | 0dc1d87490eaadbe245af7406b0e5ca4d53f17a0 (diff) | |
parent | ffe59b27a956e4430a97d65874ef15c5e9129ee0 (diff) | |
download | sway-3a3c50135fabc6a23f7b130effef9b642e54bf3c.tar.xz |
Merge pull request #26 from Luminarys/master
Added in proper workspace name generation and command queue
Diffstat (limited to 'sway/handlers.c')
-rw-r--r-- | sway/handlers.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index fe7de75b..48c6cbf7 100644 --- a/sway/handlers.c +++ b/sway/handlers.c @@ -8,6 +8,7 @@ #include "config.h" #include "commands.h" #include "handlers.h" +#include "stringop.h" static bool handle_output_created(wlc_handle output) { add_output(output); @@ -163,6 +164,23 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w return true; } +static void handle_wlc_ready(void) { + sway_log(L_DEBUG, "Compositor is ready, executing cmds in queue"); + + int i; + for (i = 0; i < config->cmd_queue->length; ++i) { + handle_command(config, config->cmd_queue->items[i]); + } + free_flat_list(config->cmd_queue); + + if (config->failed) { + sway_log(L_ERROR, "Programs have been execd, aborting!"); + sway_abort("Unable to load config"); + } + + config->active = true; +} + struct wlc_interface interface = { .output = { @@ -185,6 +203,9 @@ struct wlc_interface interface = { .pointer = { .motion = handle_pointer_motion, .button = handle_pointer_button + }, + .compositor = { + .ready = handle_wlc_ready } }; |