All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] cocoa: stop using MOUSE_EVENT_*
Date: Tue, 17 Jan 2017 16:20:22 +0100	[thread overview]
Message-ID: <1484666422.31968.74.camel@redhat.com> (raw)
In-Reply-To: <CAFEAcA9F3UzZkM=qX=aNe2_x9mW6dt3gQsgYUbhaXRVB2FdVhw@mail.gmail.com>

On Di, 2017-01-17 at 10:44 +0000, Peter Maydell wrote:
> On 17 January 2017 at 08:20, Gerd Hoffmann <kraxel@redhat.com> wrote:
> > On Mo, 2017-01-16 at 18:35 +0000, Peter Maydell wrote:
> >> On 11 January 2017 at 10:58, Gerd Hoffmann <kraxel@redhat.com> wrote:
> >> > No need to go the indirect route with a bitfield and mapping the bits to
> >> > INPUT_BUTTON_*.  We can use a bool array and INPUT_BUTTON_* directly
> >> > instead.
> >> >
> >> > Untested, not even compiled, due to lack of a osx^Wmacos machine.
> >> > Test results are very welcome.
> >>
> >> So what does the patch gain us?
> >
> > I can drop MOUSE_EVENT_WHEEL* without breaking the osx build.
> 
> Why do you want to drop it, though? It's a valid mouse event
> type, and you're not going to drop the whole MOUSE_EVENT_* set
> of defines, I assume, because they're used in lots of devices.

Dunno where the MOUSE_EVENT_* #defines originally come from, I suspect
from old ps2 mouse protocols, for historical reasons, simliar to the
numeric key codes we have in qemu which are pc scancodes too.

So, yes, I considered dropping them all and use hardware-specific
#defines instead.  But it seems at least for the left/right/middle
buttons most (all?) hardware agrees on which bit is which.  So the
attempt to drop the button defines looks like pointless churn.

For the wheel that isn't the case though, that is either not present at
all (older devices) or implemented in different ways (virtual buttons,
wheel axis, ...).

cheers,
  Gerd

  reply	other threads:[~2017-01-17 15:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-11 10:58 [Qemu-devel] [PATCH] cocoa: stop using MOUSE_EVENT_* Gerd Hoffmann
2017-01-16 18:35 ` Peter Maydell
2017-01-17  8:20   ` Gerd Hoffmann
2017-01-17 10:44     ` Peter Maydell
2017-01-17 15:20       ` Gerd Hoffmann [this message]
2017-01-26 22:47         ` 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=1484666422.31968.74.camel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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.