On Sat, Jul 27, 2013 at 02:31:40PM +0200, Mark Kettenis wrote: > > From: Thomas Klausner <[email protected]> > > Date: Fri, 26 Jul 2013 23:24:10 +0200 > > > > Only default to /dev/wskbd if Protocol is set to wskbd. Now Protocol > > "standard" should work again. > > That description doesn't really make any sense. Currently there is no > default for the "Device" option. This diff is just adding a default, > but only for the "wskbd" protocol. That in itself makes sense and > /dev/wskbd seems to be a reasonable choice. Unless of course it was a > deliberate choice to have no default device, which might make some > sense to prevent a 2nd X server on the machine stealing the keyboard > from the 1st one.
You're right, the commit message doesn't make sense. I've improved it. wskbd is a multiplex device for all keyboards. I guess if you want to run multiple X servers you'll have to use wskbd0, wskbd1, etc. explicitly. > Probably a good idea to give Matthieu Herrb a chance to review the > diffs in this series. Nevertheless for this one: > > Reviewed-by: Mark Kettenis <[email protected]> Thank you for the review! Thomas
>From 5b726873a966629a0bffa6318e8a8a8ff89f9f37 Mon Sep 17 00:00:00 2001 From: Thomas Klausner <[email protected]> Date: Fri, 26 Jul 2013 21:44:35 +0200 Subject: [PATCH:xf86-input-keyboard 15/23] Add default device for Protocol "wskbd". >From Michael Lorenz <[email protected]> Signed-off-by: Thomas Klausner <[email protected]> Reviewed-by: Mark Kettenis <[email protected]> --- src/bsd_kbd.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c index b6235d7..d3c3748 100644 --- a/src/bsd_kbd.c +++ b/src/bsd_kbd.c @@ -359,20 +359,18 @@ OpenKeyboard(InputInfoPtr pInfo) } free(s); - s = xf86SetStrOption(pInfo->options, "Device", NULL); + if (prot == PROT_WSCONS) + s = xf86SetStrOption(pInfo->options, "Device", "/dev/wskbd"); + else + s = xf86SetStrOption(pInfo->options, "Device", NULL); + if (s == NULL) { - if (prot == PROT_WSCONS) { - xf86Msg(X_ERROR,"A \"device\" option is required with" - " the \"wskbd\" keyboard protocol\n"); - return FALSE; - } else { - pInfo->fd = xf86Info.consoleFd; - pKbd->isConsole = TRUE; - pKbd->consType = xf86Info.consType; - } + pInfo->fd = xf86Info.consoleFd; + pKbd->isConsole = TRUE; + pKbd->consType = xf86Info.consType; } else { pInfo->fd = open(s, O_RDONLY | O_NONBLOCK | O_EXCL); - if (pInfo->fd == -1) { + if (pInfo->fd == -1) { xf86Msg(X_ERROR, "%s: cannot open \"%s\"\n", pInfo->name, s); free(s); return FALSE; -- 1.8.3.3
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
