WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Paravirt framebuffer backend tools [2/5]

To: Markus Armbruster <armbru@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Paravirt framebuffer backend tools [2/5]
From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Date: Wed, 4 Oct 2006 15:20:03 +0100
Cc: Jeremy Katz <katzj@xxxxxxxxxx>, aliguori <aliguori@xxxxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, sos22@xxxxxxxxxxxxx
Delivery-date: Wed, 04 Oct 2006 07:20:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <87y7rwyy6q.fsf@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20060904090150.GC4812@xxxxxxxxx> <87y7s168k2.fsf@xxxxxxxxxxxxxxxxx> <20061002090145.GA3576@xxxxxxxxx> <87y7rwyy6q.fsf@xxxxxxxxxxxxxxxxx>
Reply-to: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
On Wed, Oct 04, 2006 at 04:04:29PM +0200, Markus Armbruster wrote:
> 
> The xenkbd protocol provides for three mouse buttons.  From xenkbd.h:
> 
>       __u8 button;       /* the button (0, 1, 2 is right, middle, left) */
> 
> This is extensible as long as we handle unknown buttons gracefully.  I
> do hate the weird encoding of buttons, though.  Too hebrew for my
> taste.
> 
> SDL provides for five buttons (SDL_BUTTON_LEFT, SDL_BUTTON_MIDDLE,
> SDL_BUTTON_RIGHT, SDL_BUTTON_WHEELUP, SDL_BUTTON_WHEELDOWN).
> 
> LibVNCServer provides for 8 buttons.
> 
> The kernel input layer provides for 8 mouse buttons (BTN_LEFT,
> BTN_RIGHT, BTN_MIDDLE, BTN_SIDE, BTN_EXTRA, BTN_FORWARD, BTN_BACK,
> BTN_TASK).
> 
> How to best map buttons from VNC and SDL to input beyond the first
> three?  If we can find a workable answer for that, providing for more
> buttons should be trivial.

Not sure why LibVNCServer bothers to go to the trouble of defining
named constants for mouse buttons, since interpretation is really
dependant on the mouse the user has plugged in & VNC protocol doesn't
care about named roles for buttons.

VNC rfb protocol allows for 8 buttons, and just documents the regular
X11 conventions[1]

  "On a conventional mouse, buttons 1, 2 and 3 correspond to the 
   left, middle and right buttons on the mouse. On a wheel mouse, 
   each step of the wheel upwards is represented by a press and 
   release of button 4, and each step downwards is represented by
   a press and release of button 5."

For VNC, it would seem we should/can just pass buttons 1-8 straight
though the whole stack with no need for funky mappings. The wire
protocol for VNC is just a U8 bitmask of buttons which are pressed.

Regards,
Dan.

[1] Page 23  http://realvnc.com/docs/rfbproto.pdf

-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel