diff options
author | Kenny Levinsen <kl@kl.wtf> | 2021-02-08 02:03:01 +0100 |
---|---|---|
committer | Tudor Brindus <me@tbrindus.ca> | 2021-02-14 13:19:08 -0500 |
commit | b5b628cb41a4a316456d5ef3014f1a2cbdc5cfc2 (patch) | |
tree | f2dca5621c62d4fea0546c8b9eee99a3cc6dfd6c /sway/commands | |
parent | b1b104152e52b4957a0d91e808f4446c50b1c22d (diff) |
input: Only commit transactions when necessary
There is no need to check for transactions at the end of every user
input, as the vast majority of input will not issue transactions. This
implementation can also hide where changes are made without an
appropriate transaction commit, as a future unrelated input would issue
the commit instead.
Instead, commit transactions in places where changes are made or are
likely to be made.
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/bind.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/commands/bind.c b/sway/commands/bind.c index f6e58d99..4c67b3ce 100644 --- a/sway/commands/bind.c +++ b/sway/commands/bind.c @@ -8,6 +8,7 @@ #include <wlr/types/wlr_cursor.h> #include "sway/commands.h" #include "sway/config.h" +#include "sway/desktop/transaction.h" #include "sway/input/cursor.h" #include "sway/input/keyboard.h" #include "sway/ipc-server.h" @@ -642,6 +643,8 @@ void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding) if (success) { ipc_event_binding(binding); } + + transaction_commit_dirty(); } /** |