From b5b628cb41a4a316456d5ef3014f1a2cbdc5cfc2 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Mon, 8 Feb 2021 02:03:01 +0100 Subject: 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. --- sway/input/keyboard.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'sway/input/keyboard.c') diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index ce259eb2..95e53934 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c @@ -9,7 +9,6 @@ #include #include #include "sway/commands.h" -#include "sway/desktop/transaction.h" #include "sway/input/input-manager.h" #include "sway/input/keyboard.h" #include "sway/input/seat.h" @@ -500,7 +499,6 @@ static void handle_key_event(struct sway_keyboard *keyboard, } } - transaction_commit_dirty(); free(device_identifier); } @@ -587,7 +585,6 @@ static int handle_keyboard_repeat(void *data) { seat_execute_command(keyboard->seat_device->sway_seat, keyboard->repeat_binding); - transaction_commit_dirty(); } return 0; } -- cgit v1.2.3-54-g00ecf