On 18 June 2018 at 23:24, Programmingkid <programmingk...@gmail.com> 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: https://developer.apple.com/documentation/appkit/nsevent/1529068-locationinwindow 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? thanks -- PMM