qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]