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/input/switch.c | |
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/input/switch.c')
-rw-r--r-- | sway/input/switch.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/sway/input/switch.c b/sway/input/switch.c index b7c28df1..9ea87a1a 100644 --- a/sway/input/switch.c +++ b/sway/input/switch.c @@ -1,5 +1,4 @@ #include "sway/config.h" -#include "sway/desktop/transaction.h" #include "sway/input/switch.h" #include <wlr/types/wlr_idle.h> #include "log.h" @@ -61,9 +60,6 @@ static void execute_binding(struct sway_switch *sway_switch) { seat_execute_command(seat, dummy_binding); free(dummy_binding); } - - transaction_commit_dirty(); - } static void handle_switch_toggle(struct wl_listener *listener, void *data) { |