[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 00/42] rework input handling, sdl2 support
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2 00/42] rework input handling, sdl2 support |
Date: |
Wed, 22 Jan 2014 22:02:13 +0000 |
On 22 January 2014 17:55, Peter Maydell <address@hidden> wrote:
> On 22 January 2014 16:20, Gerd Hoffmann <address@hidden> wrote:
>> cocoa ui code has been updated, but is totally untested (not even
>> compiled). Would be great if someone with macos hardware can give
>> it a spin, and send fixup patches if needed.
> 3 warnings and 5 errors generated.
> make: *** [ui/cocoa.o] Error 1
The following obvious fixes seem to make it compile and
display stuff (I don't have a guest to hand that I could test the
mouse input with):
manooth$ git diff
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 146fb21..f20fd1f 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -670,7 +670,7 @@ QemuCocoaView *cocoaView;
break;
case NSScrollWheel:
if (isTabletEnabled || isMouseGrabbed) {
- button |= ([event deltaY] < 0) ?
+ buttons |= ([event deltaY] < 0) ?
MOUSE_EVENT_WHEELUP : MOUSE_EVENT_WHEELDN;
mouse_event = true;
} else {
@@ -690,15 +690,15 @@ QemuCocoaView *cocoaView;
[INPUT_BUTTON_WHEEL_UP] = MOUSE_EVENT_WHEELUP,
[INPUT_BUTTON_WHEEL_DOWN] = MOUSE_EVENT_WHEELDN,
};
- qemu_input_update_buttons(con, bmap, last_buttons, buttons);
+ qemu_input_update_buttons(dcl->con, bmap, last_buttons, buttons);
last_buttons = buttons;
}
if (isTabletEnabled) {
qemu_input_queue_abs(dcl->con, INPUT_AXIS_X, p.x, screen.width);
qemu_input_queue_abs(dcl->con, INPUT_AXIS_Y, p.y, screen.height);
- } else if (isMouseGrabed) {
- qemu_input_queue_rel(con, INPUT_AXIS_X, (int)[event deltaX]);
- qemu_input_queue_rel(con, INPUT_AXIS_Y, (int)[event deltaY]);
+ } else if (isMouseGrabbed) {
+ qemu_input_queue_rel(dcl->con, INPUT_AXIS_X, (int)[event deltaX]);
+ qemu_input_queue_rel(dcl->con, INPUT_AXIS_Y, (int)[event deltaY]);
} else {
[NSApp sendEvent:event];
}
Signed-off-by: Peter Maydell <address@hidden>
though I'm assuming you'll just squash the fix into your patchset.
thanks
-- PMM
- [Qemu-devel] [PATCH v2 42/42] input: remove index_from_keycode (no users), (continued)
- [Qemu-devel] [PATCH v2 42/42] input: remove index_from_keycode (no users), Gerd Hoffmann, 2014/01/22
- [Qemu-devel] [PATCH v2 39/42] sdl2: codestyle fixups, Gerd Hoffmann, 2014/01/22
- [Qemu-devel] [PATCH v2 32/42] input-legacy: remove kbd_put_keycode, Gerd Hoffmann, 2014/01/22
- [Qemu-devel] [PATCH v2 40/42] input: move qmp_query_mice to new core, Gerd Hoffmann, 2014/01/22
- [Qemu-devel] [PATCH v2 41/42] input: move do_mouse_set to new core, Gerd Hoffmann, 2014/01/22
- [Qemu-devel] [PATCH v2 37/42] input: add input_mouse_mode tracepoint, Gerd Hoffmann, 2014/01/22
- [Qemu-devel] [PATCH v2 38/42] sdl2: simplify keymap handling, Gerd Hoffmann, 2014/01/22
- [Qemu-devel] [PATCH v2 30/42] input: mouse: switch cocoa ui to new core [untested], Gerd Hoffmann, 2014/01/22
- [Qemu-devel] [PATCH v2 36/42] input: move mouse mode notifier to new core, Gerd Hoffmann, 2014/01/22
- Re: [Qemu-devel] [PATCH v2 00/42] rework input handling, sdl2 support, Peter Maydell, 2014/01/22
- Re: [Qemu-devel] [PATCH v2 00/42] rework input handling, sdl2 support,
Peter Maydell <=