qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] cocoa: stop using MOUSE_EVENT_*


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH] cocoa: stop using MOUSE_EVENT_*
Date: Tue, 17 Jan 2017 16:20:22 +0100

On Di, 2017-01-17 at 10:44 +0000, Peter Maydell wrote:
> On 17 January 2017 at 08:20, Gerd Hoffmann <address@hidden> wrote:
> > On Mo, 2017-01-16 at 18:35 +0000, Peter Maydell wrote:
> >> On 11 January 2017 at 10:58, Gerd Hoffmann <address@hidden> 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 via email to

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