diff options
author | taiyu <taiyu.len@gmail.com> | 2015-09-02 08:51:26 -0700 |
---|---|---|
committer | taiyu <taiyu.len@gmail.com> | 2015-09-02 08:51:26 -0700 |
commit | 782729be1388f3b8f603b4d328bc861fd3624233 (patch) | |
tree | 6186f5c097e76b9b6c3837f4309fa092e605626f | |
parent | fclose /proc/modules when we're done with it (diff) | |
download | sway-782729be1388f3b8f603b4d328bc861fd3624233.tar.gz sway-782729be1388f3b8f603b4d328bc861fd3624233.tar.zst sway-782729be1388f3b8f603b4d328bc861fd3624233.zip |
properly free cmd_queue, should partially fix #165 from what i tell from its log.
-rw-r--r-- | sway/handlers.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index b12be9f7..413c17fe 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -485,12 +485,12 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w | |||
485 | 485 | ||
486 | static void handle_wlc_ready(void) { | 486 | static void handle_wlc_ready(void) { |
487 | sway_log(L_DEBUG, "Compositor is ready, executing cmds in queue"); | 487 | sway_log(L_DEBUG, "Compositor is ready, executing cmds in queue"); |
488 | 488 | // Execute commands until there are none left | |
489 | int i; | 489 | while (config->cmd_queue->length) { |
490 | for (i = 0; i < config->cmd_queue->length; ++i) { | 490 | handle_command(config, config->cmd_queue->items[0]); |
491 | handle_command(config, config->cmd_queue->items[i]); | 491 | free(config->cmd_queue->items[0]); |
492 | list_del(config->cmd_queue, 0); | ||
492 | } | 493 | } |
493 | free_flat_list(config->cmd_queue); | ||
494 | config->active = true; | 494 | config->active = true; |
495 | } | 495 | } |
496 | 496 | ||