All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Programmingkid <programmingkidx@gmail.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] ui/cocoa.m: fix absolute mode
Date: Sun, 1 Jul 2018 20:24:23 +0100	[thread overview]
Message-ID: <CAFEAcA9sX8xJZM-TgC9BJcYrhYTw5FOZukYkHCj-7BLUuHfyWQ@mail.gmail.com> (raw)
In-Reply-To: <5BE60DE6-10C2-4B62-B34D-50F6C014EE7A@gmail.com>

On 18 June 2018 at 23:24, Programmingkid <programmingkidx@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

  reply	other threads:[~2018-07-01 19:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 20:01 [Qemu-devel] [PATCH] ui/cocoa.m: fix absolute mode John Arbuckle
2018-06-18 11:18 ` Peter Maydell
2018-06-18 22:24   ` Programmingkid
2018-07-01 19:24     ` Peter Maydell [this message]
2018-07-01 19:26 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFEAcA9sX8xJZM-TgC9BJcYrhYTw5FOZukYkHCj-7BLUuHfyWQ@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=programmingkidx@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.