diff options
| author | Tony Crisci <tony@dubstepdish.com> | 2018-01-20 14:10:11 -0500 | 
|---|---|---|
| committer | Tony Crisci <tony@dubstepdish.com> | 2018-01-20 14:10:11 -0500 | 
| commit | c353e01c85049cfbc09510657e453b6aa5fd9c2d (patch) | |
| tree | c6ef14cfc08861ff8c62675ca1fbbbb00e9197cf /sway/input/keyboard.c | |
| parent | cc3c713889e529c74888d9cd89af7039bfbae20c (diff) | |
| download | sway-c353e01c85049cfbc09510657e453b6aa5fd9c2d.tar.xz | |
add kill command
Diffstat (limited to 'sway/input/keyboard.c')
| -rw-r--r-- | sway/input/keyboard.c | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index 5827a1ca..6dc57d46 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c @@ -89,9 +89,12 @@ static bool binding_matches_key_state(struct sway_binding *binding,  	return false;  } -static void binding_execute_command(struct sway_binding *binding) { +static void keyboard_execute_command(struct sway_keyboard *keyboard, +		struct sway_binding *binding) {  	wlr_log(L_DEBUG, "running command for binding: %s",  		binding->command); +	config_clear_handler_context(config); +	config->handler_context.seat = keyboard->seat_device->sway_seat;  	struct cmd_results *results = handle_command(binding->command);  	if (results->status != CMD_SUCCESS) {  		wlr_log(L_DEBUG, "could not run command for binding: %s", @@ -160,7 +163,7 @@ static bool keyboard_execute_bindsym(struct sway_keyboard *keyboard,  		}  		if (match) { -			binding_execute_command(binding); +			keyboard_execute_command(keyboard, binding);  			return true;  		}  	} @@ -267,7 +270,7 @@ static bool keyboard_execute_bindcode(struct sway_keyboard *keyboard,  	for (int i = 0; i < keycode_bindings->length; ++i) {  		struct sway_binding *binding = keycode_bindings->items[i];  		if (binding_matches_keycodes(wlr_keyboard, binding, event)) { -			binding_execute_command(binding); +			keyboard_execute_command(keyboard, binding);  			return true;  		}  	} | 
