Hi On Wed, Dec 22, 2021 at 5:31 AM Dmitry Petrov <dpetr...@gmail.com> wrote:
> This code seems to be used by vmport hack, passing these values allows > to implement horizontal scroll support even when using vmport. > In case it's not supported horizontal scroll will act as a vertical one. > > Signed-off-by: Dmitry Petrov <dpetr...@gmail.com> > Hmm, apparently Linux kernel handles PSMOUSE_VMMOUSE as a generic ps/2 mouse without the extensions. And there is no horizontal scrolling in vmmouse protocol I can find. --- > ui/input-legacy.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/ui/input-legacy.c b/ui/input-legacy.c > index 9fc78a639b..2c9a215d7f 100644 > --- a/ui/input-legacy.c > +++ b/ui/input-legacy.c > @@ -23,6 +23,7 @@ > */ > > #include "qemu/osdep.h" > +#include "qemu/log.h" > #include "qapi/qapi-commands-ui.h" > #include "ui/console.h" > #include "keymaps.h" > @@ -179,6 +180,20 @@ static void legacy_mouse_event(DeviceState *dev, > QemuConsole *src, > 1, > s->buttons); > } > + if (btn->down && btn->button == INPUT_BUTTON_WHEEL_RIGHT) { > + s->qemu_put_mouse_event(s->qemu_put_mouse_event_opaque, > + s->axis[INPUT_AXIS_X], > + s->axis[INPUT_AXIS_Y], > + -2, > + s->buttons); > + } > + if (btn->down && btn->button == INPUT_BUTTON_WHEEL_LEFT) { > + s->qemu_put_mouse_event(s->qemu_put_mouse_event_opaque, > + s->axis[INPUT_AXIS_X], > + s->axis[INPUT_AXIS_Y], > + 2, > + s->buttons); > + } > So I think mapping to vertical makes sense, although I am not sure it's necessary. break; > case INPUT_EVENT_KIND_ABS: > move = evt->u.abs.data; > @@ -216,6 +231,7 @@ QEMUPutMouseEntry > *qemu_add_mouse_event_handler(QEMUPutMouseEvent *func, > QEMUPutMouseEntry *s; > > s = g_new0(QEMUPutMouseEntry, 1); > + qemu_log("qemu_add_mouse_event_handler %s", name); > > Please remove that logging > s->qemu_put_mouse_event = func; > s->qemu_put_mouse_event_opaque = opaque; > -- > 2.32.0 > > > -- Marc-André Lureau