From: "Daniel P. Berrange" <berrange@redhat.com>
To: Gerd Hoffmann <kraxel@suse.de>
Cc: Xen devel list <xen-devel@lists.xensource.com>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: Re: [patch] pvfb: Split mouse and keyboard into separate devices.
Date: Mon, 5 Feb 2007 20:55:21 +0000 [thread overview]
Message-ID: <20070205205521.GB5478@redhat.com> (raw)
In-Reply-To: <45C6F495.7000900@suse.de>
On Mon, Feb 05, 2007 at 10:10:45AM +0100, Gerd Hoffmann wrote:
> Daniel P. Berrange wrote:
> > - 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)
>
> Bad idea IMHO ...
Yep, that's unneccessary since I realized you can have a single
device doing both mouse&keyboard, and get absolute co-ords from it
with no issues.
> > 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.
>
> ... exactly thats why.
>
> As long as /dev/input/event* isn't used there is absolutely no
> difference in having a single or two separate devices for keyboard and
> mouse events. In both cases all events go through the kernel's keyboard
> driver and /dev/input/mice. The mouse "just works" with the default
> X-Server configuration, using relative coordinates though.
Yep, I was mistaken in my previous mail about the dual device not working
with relative mouse out of the box.
> Having two separate devices allows to handle mouse events only via
> /dev/input/event to (optionally) have a better configuration with
> absolute coordinates, without messing up the keyboard.
>
> You can even create a configuration file which works fine in both cases:
> xen virtual mouse being present and being not present.
>
> Why do you want to keep the device with both keyboard and mouse events?
>
> It makes things much more complicated IMHO.
AFAICT, there is zero difference in complexity of configuration. In both
cases, if you have a default Xorg config, the relative mouse will work
out of the box.
With the existing single keyboard+mouse device there is a single
config section to add:
Section "InputDevice"
Identifier "XenInput0"
Driver "evdev"
Option "CorePointer"
Option "SendCoreEvents"
Option "Device" "/dev/input/event0"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
(Possibily with the extra 'Option' tags you noted in the previous
mail for legacy xorg releases of evdev.)
While with the two separate devices, there is a single section to add:
Section "InputDevice"
Identifier "XenInput0"
Driver "evdev"
Option "CorePointer"
Option "Device" "/dev/input/event1"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
So there is only 1 line difference in the Xorg config required to get the
absolute mouse working in both cases. If we were implementing PVFB from
scratch today, I think I'd agree that having separate devices for mouse
and keyboard would be the approach to take. At this time, though we already
have done releases with the current single device. Both approaches have the
same end result - relative mouse just works, and absolute mouse requires 1
section added to the xorg config.
In addition, Xorg is moving towards auto-configuring all devices so I hope
that we'll be able to get X to auto-configure absolute mouse correctly
without need for any config at all regardless of which impl we have.
So I don't really see any compelling reason to change the way the input
devices are exposed.
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 -=|
next prev parent reply other threads:[~2007-02-05 20:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-01 10:59 [patch] pvfb: Split mouse and keyboard into separate devices Gerd Hoffmann
2007-02-01 13:15 ` Markus Armbruster
2007-02-01 13:47 ` Gerd Hoffmann
2007-02-01 17:37 ` Markus Armbruster
2007-02-01 18:05 ` Daniel P. Berrange
2007-02-02 8:39 ` Gerd Hoffmann
2007-02-02 15:25 ` Keir Fraser
2007-02-02 16:29 ` Gerd Hoffmann
2007-02-02 18:11 ` Keir Fraser
2007-02-03 0:28 ` Daniel P. Berrange
2007-02-03 3:51 ` Daniel P. Berrange
2007-02-05 9:20 ` Gerd Hoffmann
2007-02-05 14:19 ` Gerd Hoffmann
2007-02-05 9:10 ` Gerd Hoffmann
2007-02-05 20:55 ` Daniel P. Berrange [this message]
2007-02-06 8:48 ` Gerd Hoffmann
2007-02-06 13:45 ` Daniel P. Berrange
2007-02-06 15:05 ` Gerd Hoffmann
2007-02-06 18:40 ` Markus Armbruster
2007-02-07 9:35 ` Gerd Hoffmann
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=20070205205521.GB5478@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=kraxel@suse.de \
--cc=xen-devel@lists.xensource.com \
/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.