aboutsummaryrefslogtreecommitdiffstats
path: root/sway/handlers.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index a329329d..ee52ba38 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -386,7 +386,7 @@ static bool handle_view_created(wlc_handle handle) {
386 struct criteria *crit = criteria->items[i]; 386 struct criteria *crit = criteria->items[i];
387 sway_log(L_DEBUG, "for_window '%s' matches new view %p, cmd: '%s'", 387 sway_log(L_DEBUG, "for_window '%s' matches new view %p, cmd: '%s'",
388 crit->crit_raw, newview, crit->cmdlist); 388 crit->crit_raw, newview, crit->cmdlist);
389 struct cmd_results *res = handle_command(crit->cmdlist); 389 struct cmd_results *res = handle_command(crit->cmdlist, CONTEXT_CRITERIA);
390 if (res->status != CMD_SUCCESS) { 390 if (res->status != CMD_SUCCESS) {
391 sway_log(L_ERROR, "Command '%s' failed: %s", res->input, res->error); 391 sway_log(L_ERROR, "Command '%s' failed: %s", res->input, res->error);
392 } 392 }
@@ -585,7 +585,7 @@ static void handle_binding_command(struct sway_binding *binding) {
585 reload = true; 585 reload = true;
586 } 586 }
587 587
588 struct cmd_results *res = handle_command(binding->command); 588 struct cmd_results *res = handle_command(binding->command, CONTEXT_BINDING);
589 if (res->status != CMD_SUCCESS) { 589 if (res->status != CMD_SUCCESS) {
590 sway_log(L_ERROR, "Command '%s' failed: %s", res->input, res->error); 590 sway_log(L_ERROR, "Command '%s' failed: %s", res->input, res->error);
591 } 591 }
@@ -936,18 +936,18 @@ bool handle_pointer_scroll(wlc_handle view, uint32_t time, const struct wlc_modi
936 int y_amount = (int)_amount[1]; 936 int y_amount = (int)_amount[1];
937 937
938 if (x_amount > 0 && strcmp(config->floating_scroll_up_cmd, "")) { 938 if (x_amount > 0 && strcmp(config->floating_scroll_up_cmd, "")) {
939 handle_command(config->floating_scroll_up_cmd); 939 handle_command(config->floating_scroll_up_cmd, CONTEXT_BINDING);
940 return EVENT_HANDLED; 940 return EVENT_HANDLED;
941 } else if (x_amount < 0 && strcmp(config->floating_scroll_down_cmd, "")) { 941 } else if (x_amount < 0 && strcmp(config->floating_scroll_down_cmd, "")) {
942 handle_command(config->floating_scroll_down_cmd); 942 handle_command(config->floating_scroll_down_cmd, CONTEXT_BINDING);
943 return EVENT_HANDLED; 943 return EVENT_HANDLED;
944 } 944 }
945 945
946 if (y_amount > 0 && strcmp(config->floating_scroll_right_cmd, "")) { 946 if (y_amount > 0 && strcmp(config->floating_scroll_right_cmd, "")) {
947 handle_command(config->floating_scroll_right_cmd); 947 handle_command(config->floating_scroll_right_cmd, CONTEXT_BINDING);
948 return EVENT_HANDLED; 948 return EVENT_HANDLED;
949 } else if (y_amount < 0 && strcmp(config->floating_scroll_left_cmd, "")) { 949 } else if (y_amount < 0 && strcmp(config->floating_scroll_left_cmd, "")) {
950 handle_command(config->floating_scroll_left_cmd); 950 handle_command(config->floating_scroll_left_cmd, CONTEXT_BINDING);
951 return EVENT_HANDLED; 951 return EVENT_HANDLED;
952 } 952 }
953 } 953 }
@@ -960,7 +960,7 @@ static void handle_wlc_ready(void) {
960 config->active = true; 960 config->active = true;
961 while (config->cmd_queue->length) { 961 while (config->cmd_queue->length) {
962 char *line = config->cmd_queue->items[0]; 962 char *line = config->cmd_queue->items[0];
963 struct cmd_results *res = handle_command(line); 963 struct cmd_results *res = handle_command(line, CONTEXT_CONFIG);
964 if (res->status != CMD_SUCCESS) { 964 if (res->status != CMD_SUCCESS) {
965 sway_log(L_ERROR, "Error on line '%s': %s", line, res->error); 965 sway_log(L_ERROR, "Error on line '%s': %s", line, res->error);
966 } 966 }