aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-07-08 16:16:43 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-07-08 16:16:43 +0000
commit58415428cf12bd282969e547f65189639ad8351a (patch)
tree97c535adc854a671e506c0dc8ab69dad68726d74 /input.c
parentmulti-seat: enable xcursor theme support again (diff)
multi-seat: re-enable mouse button+motion reporting support
Diffstat (limited to 'input.c')
-rw-r--r--input.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/input.c b/input.c
index 176d9809..67d28102 100644
--- a/input.c
+++ b/input.c
@@ -1020,7 +1020,8 @@ wl_pointer_motion(void *data, struct wl_pointer *wl_pointer,
selection_update(term, col, row);
term_mouse_motion(
- term, seat->mouse.button, seat->mouse.row, seat->mouse.col);
+ term, seat->mouse.button, seat->mouse.row, seat->mouse.col,
+ seat->kbd.shift, seat->kbd.alt, seat->kbd.ctrl);
break;
}
}
@@ -1232,7 +1233,9 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
}
}
- term_mouse_down(term, button, seat->mouse.row, seat->mouse.col);
+ term_mouse_down(
+ term, button, seat->mouse.row, seat->mouse.col,
+ seat->kbd.shift, seat->kbd.alt, seat->kbd.ctrl);
break;
}
@@ -1240,7 +1243,9 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
if (button == BTN_LEFT && term->selection.end.col != -1)
selection_finalize(term, serial);
- term_mouse_up(term, button, seat->mouse.row, seat->mouse.col);
+ term_mouse_up(
+ term, button, seat->mouse.row, seat->mouse.col,
+ seat->kbd.shift, seat->kbd.alt, seat->kbd.ctrl);
break;
}
break;
@@ -1288,9 +1293,14 @@ mouse_scroll(struct seat *seat, int amount)
keyboard_key(seat, NULL, seat->input_serial, 0, key - 8, XKB_KEY_DOWN);
keyboard_key(seat, NULL, seat->input_serial, 0, key - 8, XKB_KEY_UP);
} else {
- for (int i = 0; i < amount; i++)
- term_mouse_down(term, button, seat->mouse.row, seat->mouse.col);
- term_mouse_up(term, button, seat->mouse.row, seat->mouse.col);
+ for (int i = 0; i < amount; i++) {
+ term_mouse_down(
+ term, button, seat->mouse.row, seat->mouse.col,
+ seat->kbd.shift, seat->kbd.alt, seat->kbd.ctrl);
+ }
+ term_mouse_up(
+ term, button, seat->mouse.row, seat->mouse.col,
+ seat->kbd.shift, seat->kbd.alt, seat->kbd.ctrl);
scrollback(term, amount);
}