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

Re: [Xen-devel] Re: [patch] pvfb: Split mouse and keyboard into separate devices.



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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.