summaryrefslogtreecommitdiff
path: root/sway/desktop/transaction.c
diff options
context:
space:
mode:
authoremersion <[email protected]>2018-07-22 19:25:41 +0100
committerGitHub <[email protected]>2018-07-22 19:25:41 +0100
commitbe60e44b7c08b87400fed0b9ea586c449883ba11 (patch)
tree5005c92ed70e19fcd9a316b9a9fad0d3ba07b6ad /sway/desktop/transaction.c
parent27f65b94ae35a7b7342ed331884f765141fad373 (diff)
parentd21d4b83a3effc56b177f5d505aedfdf2ddbbbd5 (diff)
Merge pull request #2296 from RyanDwyer/floating-modifier
Implement floating_modifier and mouse operations for floating views
Diffstat (limited to 'sway/desktop/transaction.c')
-rw-r--r--sway/desktop/transaction.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index 19f41efc..2a89880a 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -222,24 +222,16 @@ static void transaction_apply(struct sway_transaction *transaction) {
}
}
-/**
- * For simplicity, we only progress the queue if it can be completely flushed.
- */
static void transaction_progress_queue() {
- // We iterate this list in reverse because we're more likely to find a
- // waiting transactions at the end of the list.
- for (int i = server.transactions->length - 1; i >= 0; --i) {
- struct sway_transaction *transaction = server.transactions->items[i];
+ while (server.transactions->length) {
+ struct sway_transaction *transaction = server.transactions->items[0];
if (transaction->num_waiting) {
return;
}
- }
- for (int i = 0; i < server.transactions->length; ++i) {
- struct sway_transaction *transaction = server.transactions->items[i];
transaction_apply(transaction);
transaction_destroy(transaction);
+ list_del(server.transactions, 0);
}
- server.transactions->length = 0;
idle_inhibit_v1_check_active(server.idle_inhibit_manager_v1);
}