diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-14 23:14:55 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-14 23:14:55 +1000 |
commit | 2032f85d94f2f222282b242116b3e827dd458f6c (patch) | |
tree | d6ad82f79521cdd948985be22630b803af58afea /sway/commands/reload.c | |
parent | Merge pull request #2244 from RyanDwyer/floating-resize (diff) | |
download | sway-2032f85d94f2f222282b242116b3e827dd458f6c.tar.gz sway-2032f85d94f2f222282b242116b3e827dd458f6c.tar.zst sway-2032f85d94f2f222282b242116b3e827dd458f6c.zip |
Simplify transactions by utilising a dirty flag on containers
This PR changes the way we handle transactions to a more simple method.
The new method is to mark containers as dirty from low level code
(eg. arranging, or container_destroy, and eventually seat_set_focus),
then call transaction_commit_dirty which picks up those containers and
runs them through a transaction. The old methods of using transactions
(arrange_and_commit, or creating one manually) are now no longer
possible.
The highest-level code (execute_command and view implementation
handlers) will call transaction_commit_dirty, so most other code just
needs to set containers as dirty. This is done by arranging, but can
also be done by calling container_set_dirty.
Diffstat (limited to 'sway/commands/reload.c')
-rw-r--r-- | sway/commands/reload.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/reload.c b/sway/commands/reload.c index c6715f9c..cea6a94b 100644 --- a/sway/commands/reload.c +++ b/sway/commands/reload.c | |||
@@ -12,6 +12,6 @@ struct cmd_results *cmd_reload(int argc, char **argv) { | |||
12 | } | 12 | } |
13 | 13 | ||
14 | load_swaybars(); | 14 | load_swaybars(); |
15 | arrange_and_commit(&root_container); | 15 | arrange_windows(&root_container); |
16 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 16 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
17 | } | 17 | } |