From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W65se-0000T5-39 for qemu-devel@nongnu.org; Wed, 22 Jan 2014 17:02:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W65sZ-0008Vx-5T for qemu-devel@nongnu.org; Wed, 22 Jan 2014 17:02:40 -0500 Received: from mail-la0-f45.google.com ([209.85.215.45]:42496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W65sY-0008Vh-VD for qemu-devel@nongnu.org; Wed, 22 Jan 2014 17:02:35 -0500 Received: by mail-la0-f45.google.com with SMTP id b8so843899lan.32 for ; Wed, 22 Jan 2014 14:02:33 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <1390407647-8659-1-git-send-email-kraxel@redhat.com> From: Peter Maydell Date: Wed, 22 Jan 2014 22:02:13 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v2 00/42] rework input handling, sdl2 support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: QEMU Developers On 22 January 2014 17:55, Peter Maydell wrote: > On 22 January 2014 16:20, Gerd Hoffmann 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 though I'm assuming you'll just squash the fix into your patchset. thanks -- PMM