summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/desktop/transaction.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index e186bf89..eac38991 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -358,11 +358,20 @@ static void transaction_progress_queue(void) {
358 // If there's a bunch of consecutive transactions which all apply to the 358 // If there's a bunch of consecutive transactions which all apply to the
359 // same views, skip all except the last one. 359 // same views, skip all except the last one.
360 while (server.transactions->length >= 2) { 360 while (server.transactions->length >= 2) {
361 struct sway_transaction *a = server.transactions->items[0]; 361 struct sway_transaction *txn = server.transactions->items[0];
362 struct sway_transaction *b = server.transactions->items[1]; 362 struct sway_transaction *dup = NULL;
363 if (transaction_same_nodes(a, b)) { 363
364 for (int i = 1; i < server.transactions->length; i++) {
365 struct sway_transaction *maybe_dup = server.transactions->items[i];
366 if (transaction_same_nodes(txn, maybe_dup)) {
367 dup = maybe_dup;
368 break;
369 }
370 }
371
372 if (dup) {
364 list_del(server.transactions, 0); 373 list_del(server.transactions, 0);
365 transaction_destroy(a); 374 transaction_destroy(txn);
366 } else { 375 } else {
367 break; 376 break;
368 } 377 }