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] Re: [patch] pvfb: Split mouse and keyboard into separate

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [patch] pvfb: Split mouse and keyboard into separate devices.
From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Date: Sat, 3 Feb 2007 00:28:25 +0000
Cc: Gerd Hoffmann <kraxel@xxxxxxx>, Xen devel list <xen-devel@xxxxxxxxxxxxxxxxxxx>, Markus Armbruster <armbru@xxxxxxxxxx>
Delivery-date: Fri, 02 Feb 2007 16:28:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C1E92F6A.8CB6%Keir.Fraser@xxxxxxxxxxxx>
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: <45C36705.5080600@xxxxxxx> <C1E92F6A.8CB6%Keir.Fraser@xxxxxxxxxxxx>
Reply-to: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
On Fri, Feb 02, 2007 at 06:11:54PM +0000, Keir Fraser wrote:
> On 2/2/07 16:29, "Gerd Hoffmann" <kraxel@xxxxxxx> wrote:
> 
> >> I guess I'll wait for this before applying the patch then.
> > 
> > With Xorg 7.2, this patch, and the device id patch on top you can add
> > this ...
> > 
> > Section "InputDevice"
> >   Driver        "evdev"
> >   Identifier    "xenptr"
> >   Option        "SendCoreEvents" "true"
> >   Option        "vendor"        "0x5853"
> >   Option        "product"       "0x0003"
> > EndSection
> > 
> > ... as additional (to the default /dev/input/mice) input device.  The
> > new input device must also be added to the serverlayout section.
> > WorksForMe[tm].
> 
> The complaint is that it doesn't work out of the box with current Xorg. If
> that is a showstopper (it certainly is at the very least very undesirable!)
> then it doesn't matter how simple the required config change is -- if any
> change is required at all then the patch is untenable.
> 
> How hard would it be to contineu to provide the combined device as well as
> the new split-out pointer device?

I've just hacked up such a version and it appears to work fine - although
you need a slightly more complicated Xorg config to get the absolute
pointer working.

So what the patch does is this:

  - One input device supplies both mouse & keyboard events - this is 
    basically same as current PVFB setup (appears /dev/input/event0)
  - A second device supplies only mouse events (/dev/input/event1)

So with a default Xorg config, X works just as before - the server sees
the relative co-ords via its default 'mouse' driver.

If we want to explicitly configure absolute co-ords, we first define an
input device for /dev/input/event1 - this deals with the pure mouse
only stream of absolute coords. The evdev driver ensures that the events
from event1 no longer get reported via the unified mouse channel. Of 
course we still have the relative coords coming in on event0 though 
and thus into X via the 'mouse' driver which mess things up. So we have
a second 'void' input device which explicitly kills off the default
mouse handling. The result, mouse events only get processed from event1

Section "ServerLayout"
   ...snip...
       InputDevice    "Mouse0" "CorePointer"
       InputDevice    "KillDefaultMouse"
EndSection

Section "InputDevice"
       Identifier  "Mouse0"
       Driver      "evdev"
       Option      "Device" "/dev/input/event1"
EndSection

Section "InputDevice"
       Identifier  "KillDefaultMouse"
       Driver      "void"
EndSection


The attached patch was against Gerd's first version of the patch, so don't
have his other fixes in yet. But it shows we can setup the input devices
such that existing relative coords work with no config changes, while allowing 
people to opt in to using absolute coords only via a xorg.conf change. 
We probably want to adjust the naming again such that event0 is called 
'Xen Virtual Keyboard/Mouse' while event1 is just called 'Xen Virtual Mouse".
This gives compatability with original xenkbd driver for programs like kudzu 
which might be doing  device lookups based on the current naming.

Regards,
Dan.
-- 
|=- 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  -=| 

Attachment: xen-abs-mouse.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>