From 58415428cf12bd282969e547f65189639ad8351a Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 8 Jul 2020 18:16:43 +0200 Subject: multi-seat: re-enable mouse button+motion reporting support --- input.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'input.c') 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); } -- cgit v1.3