mirror of
https://github.com/NickHu/sway
synced 2024-12-28 22:23:30 +01:00
properly free cmd_queue, should partially fix #165 from what i tell from its log.
This commit is contained in:
parent
1756a4f2da
commit
782729be13
1 changed files with 5 additions and 5 deletions
|
@ -485,12 +485,12 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w
|
|||
|
||||
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]);
|
||||
// Execute commands until there are none left
|
||||
while (config->cmd_queue->length) {
|
||||
handle_command(config, config->cmd_queue->items[0]);
|
||||
free(config->cmd_queue->items[0]);
|
||||
list_del(config->cmd_queue, 0);
|
||||
}
|
||||
free_flat_list(config->cmd_queue);
|
||||
config->active = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue