[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/20] ui/input-legacy: pass horizontal scroll information
From: |
Gerd Hoffmann |
Subject: |
[PULL 20/20] ui/input-legacy: pass horizontal scroll information |
Date: |
Fri, 14 Jan 2022 07:53:26 +0100 |
From: Dmitry Petrov <dpetroff@gmail.com>
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 <dpetroff@gmail.com>
Message-Id: <20220108153947.171861-6-dpetroff@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/input-legacy.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/ui/input-legacy.c b/ui/input-legacy.c
index 9fc78a639bd4..46ea74e44d6d 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);
+ }
break;
case INPUT_EVENT_KIND_ABS:
move = evt->u.abs.data;
--
2.34.1
- [PULL 03/20] ui/vnc.c: Fixed a deadlock bug., (continued)
- [PULL 03/20] ui/vnc.c: Fixed a deadlock bug., Gerd Hoffmann, 2022/01/14
- [PULL 05/20] dsoundaudio: fix crackling audio recordings, Gerd Hoffmann, 2022/01/14
- [PULL 08/20] ui: fix gtk clipboard clear assertion, Gerd Hoffmann, 2022/01/14
- [PULL 10/20] hw/display: Rename VGA_ISA_MM -> VGA_MMIO, Gerd Hoffmann, 2022/01/14
- [PULL 04/20] jackaudio: use ifdefs to hide unavailable functions, Gerd Hoffmann, 2022/01/14
- [PULL 09/20] uas: add missing return, Gerd Hoffmann, 2022/01/14
- [PULL 06/20] hw/audio/intel-hda: fix stream reset, Gerd Hoffmann, 2022/01/14
- [PULL 11/20] hw/display/vga-mmio: Inline vga_mm_init(), Gerd Hoffmann, 2022/01/14
- [PULL 12/20] hw/display/vga-mmio: QOM'ify vga_mmio_init() as TYPE_VGA_MMIO, Gerd Hoffmann, 2022/01/14
- [PULL 15/20] edid: Added support for 4k@60 Hz monitor, Gerd Hoffmann, 2022/01/14
- [PULL 20/20] ui/input-legacy: pass horizontal scroll information,
Gerd Hoffmann <=
- [PULL 07/20] ui/dbus: fix buffer-overflow detected by ASAN, Gerd Hoffmann, 2022/01/14
- [PULL 13/20] hw/mips/jazz: Inline vga_mmio_init() and remove it, Gerd Hoffmann, 2022/01/14
- [PULL 17/20] ui/cocoa: pass horizontal scroll information to the device code, Gerd Hoffmann, 2022/01/14
- [PULL 14/20] edid: set default resolution to 1280x800 (WXGA), Gerd Hoffmann, 2022/01/14
- [PULL 16/20] ps2: Initial horizontal scroll support, Gerd Hoffmann, 2022/01/14
- [PULL 18/20] ui/gtk: pass horizontal scroll information to the device code, Gerd Hoffmann, 2022/01/14
- [PULL 19/20] ui/sdl2: pass horizontal scroll information to the device code, Gerd Hoffmann, 2022/01/14
- Re: [PULL 00/20] Kraxel 20220114 patches, Peter Maydell, 2022/01/14