summaryrefslogtreecommitdiff
path: root/sway/handlers.c
diff options
context:
space:
mode:
authorLuminarys <[email protected]>2015-08-13 12:32:43 -0500
committerLuminarys <[email protected]>2015-08-13 14:41:36 -0500
commitab130fb56b5c450d3821cfdfc18fc7a37487c70a (patch)
tree83ab7d27907dfa8c2a5f0d7bd740f8f49a208e50 /sway/handlers.c
parent2c9f5eca89ac5ab1a3eaacc3b56243978098408c (diff)
Added in command queue
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index fe7de75b..220aeb01 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -163,6 +163,16 @@ 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) {
+ sway_log(L_DEBUG, "Handling command %s", config->cmd_queue->items[i]);
+ handle_command(config, config->cmd_queue->items[i]);
+ }
+ list_free(config->cmd_queue);
+}
+
struct wlc_interface interface = {
.output = {
@@ -185,6 +195,9 @@ struct wlc_interface interface = {
.pointer = {
.motion = handle_pointer_motion,
.button = handle_pointer_button
+ },
+ .compositor = {
+ .ready = handle_wlc_ready
}
};