[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] ui/cocoa.m: fix absolute mode

From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] ui/cocoa.m: fix absolute mode
Date: Sun, 1 Jul 2018 20:24:23 +0100

On 18 June 2018 at 23:24, Programmingkid <address@hidden> wrote:
> When using an usb-tablet device in QEMU, the Cocoa UI uses absolute
>mode code to handle mouse events. The absolute mode code does not
>correctly determine where QEMU's window is located. Tests indicate
>the current code thinks the window is located in the bottom left
>of the screen.

I guess this is happening because of the note in the
NSEvent locationInWindow method docs that the event
can have a nil window, in which case it gives you the
event location in screen coordinates:

Those docs also say that the common way to deal with this
is to use the NSView convert method to get the window-relative
coordinates that you want. Maybe we just need to do that?

-- PMM

reply via email to

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