aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2026-01-10 06:35:25 +0000
committerDaniel Eklöf <daniel@ekloef.se>2026-01-10 06:35:25 +0000
commite2a989785ab32a39aaa8d49a45b8a94b12a12fa3 (patch)
treefec4892683cdd84c10b20a61d51b0144af6d98d7 /input.c
parentshm: don't bother with xrgb surfaces, always use argb (diff)
input: execute: add missing 'return true' to a couple of switch cases
Without this, the input handling code won't understand the key/mouse event was consumed (i.e. triggered a shortcut), and will continue processing normally (e.g. sending event to the client application).
Diffstat (limited to 'input.c')
-rw-r--r--input.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/input.c b/input.c
index 80b028ac..e8e84fb7 100644
--- a/input.c
+++ b/input.c
@@ -120,10 +120,14 @@ execute_binding(struct seat *seat, struct terminal *term,
case BIND_ACTION_SCROLLBACK_UP_MOUSE:
if (term->grid == &term->alt) {
- if (term->alt_scrolling)
+ if (term->alt_scrolling) {
alternate_scroll(seat, amount, BTN_BACK);
- } else
- cmd_scrollback_up(term, amount);
+ return true;
+ }
+ } else {
+ cmd_scrollback_up(term, amount);
+ return true;
+ }
break;
case BIND_ACTION_SCROLLBACK_DOWN_PAGE:
@@ -149,10 +153,14 @@ execute_binding(struct seat *seat, struct terminal *term,
case BIND_ACTION_SCROLLBACK_DOWN_MOUSE:
if (term->grid == &term->alt) {
- if (term->alt_scrolling)
+ if (term->alt_scrolling) {
alternate_scroll(seat, amount, BTN_FORWARD);
- } else
+ return true;
+ }
+ } else {
cmd_scrollback_down(term, amount);
+ return true;
+ }
break;
case BIND_ACTION_SCROLLBACK_HOME:
@@ -535,7 +543,7 @@ execute_binding(struct seat *seat, struct terminal *term,
case BIND_ACTION_SELECT_QUOTE:
selection_start(
term, seat->mouse.col, seat->mouse.row, SELECTION_QUOTE_WISE, false);
- break;
+ return true;
case BIND_ACTION_SELECT_ROW:
selection_start(