aboutsummaryrefslogtreecommitdiff
path: root/include/sway/desktop/transaction.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/desktop/transaction.h')
-rw-r--r--include/sway/desktop/transaction.h33
1 files changed, 12 insertions, 21 deletions
diff --git a/include/sway/desktop/transaction.h b/include/sway/desktop/transaction.h
index 7ab80eb8..cee4afed 100644
--- a/include/sway/desktop/transaction.h
+++ b/include/sway/desktop/transaction.h
@@ -6,34 +6,25 @@
/**
* Transactions enable us to perform atomic layout updates.
*
- * When we want to make adjustments to the layout, we create a transaction.
- * A transaction contains a list of affected containers and their new state.
+ * A transaction contains a list of containers and their new state.
* A state might contain a new size, or new border settings, or new parent/child
* relationships.
*
- * Calling transaction_commit() makes sway notify of all the affected clients
- * with their new sizes. We then wait for all the views to respond with their
- * new surface sizes. When all are ready, or when a timeout has passed, we apply
- * the updates all at the same time.
- */
-
-struct sway_transaction;
-
-/**
- * Create a new transaction.
- */
-struct sway_transaction *transaction_create(void);
-
-/**
- * Add a container's pending state to the transaction.
+ * Committing a transaction makes sway notify of all the affected clients with
+ * their new sizes. We then wait for all the views to respond with their new
+ * surface sizes. When all are ready, or when a timeout has passed, we apply the
+ * updates all at the same time.
+ *
+ * When we want to make adjustments to the layout, we change the pending state
+ * in containers, mark them as dirty and call transaction_commit_dirty(). This
+ * create and commits a transaction from the dirty containers.
*/
-void transaction_add_container(struct sway_transaction *transaction,
- struct sway_container *container);
/**
- * Submit a transaction to the client views for configuration.
+ * Find all dirty containers, create and commit a transaction containing them,
+ * and unmark them as dirty.
*/
-void transaction_commit(struct sway_transaction *transaction);
+void transaction_commit_dirty(void);
/**
* Notify the transaction system that a view is ready for the new layout.