[PATCH RESEND 5/5] xfree86: use NewInputDeviceRequest for xorg.conf devices too

Peter Hutterer peter.hutterer at who-t.net
Thu Oct 20 16:22:25 PDT 2011


On Thu, Oct 20, 2011 at 02:17:57PM +0100, Daniel Stone wrote:
> Hi,
> 
> On Thu, Oct 20, 2011 at 01:05:32PM +1000, Peter Hutterer wrote:
> > diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
> > index 96e98c1..cb4be42 100644
> > --- a/hw/xfree86/common/xf86Config.c
> > +++ b/hw/xfree86/common/xf86Config.c
> > @@ -1196,6 +1196,10 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
> >  	if (foundPointer) {
> >  	    Pointer->options = xf86AddNewOption(Pointer->options,
> >  					        "CorePointer", "on");
> > +	    Pointer->options = xf86AddNewOption(Pointer->options,
> > +						"driver", confInput->inp_driver);
> > +	    Pointer->options = xf86AddNewOption(Pointer->options,
> > +						"identifier", confInput->inp_identifier);
> >  	    servlayoutp->inputs = addDevice(servlayoutp->inputs, Pointer);
> >  	}
> >      }
> > @@ -1286,6 +1290,10 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
> >  	if (foundKeyboard) {
> >  	    Keyboard->options = xf86AddNewOption(Keyboard->options,
> >  						 "CoreKeyboard", "on");
> > +	    Keyboard->options = xf86AddNewOption(Keyboard->options,
> > +						 "driver", confInput->inp_driver);
> > +	    Keyboard->options = xf86AddNewOption(Keyboard->options,
> > +						 "identifier", confInput->inp_identifier);
> >  	    servlayoutp->inputs = addDevice(servlayoutp->inputs, Keyboard);
> >  	}
> >      }
> 
> Adding "_source" / "server/conf" or similar might be nice.  Even though
> no-one really uses it.

yeah, might do that in a follow-up patch. I think at some point i had a
patch for _source/implicit, not sure where that ended up.

> > @@ -842,20 +827,8 @@ InitInput(int argc, char **argv)
> >  
> >      /* Initialize all configured input devices */
> >      for (pInfo = xf86ConfigLayout.inputs; pInfo && *pInfo; pInfo++) {
> > -        InputInfoPtr dup;
> > -        /* Replace obsolete keyboard driver with kbd */
> > -        if (!xf86NameCmp((*pInfo)->driver, "keyboard")) {
> > -            strcpy((*pInfo)->driver, "kbd");
> > -        }
> 
> It'd probably be polite to keep this logic around in NIDR.

looks like xf86parseInputSection already replaces "keyboard" with "kbd", so
right now I'm not sure what to do to get here with driver "keyboard".  i'm
quite happy to let the first user that stumbles into this figure it out,
it'll be a simple patch regardless anyway.


> Otherwise:
> Reviewed-by: Daniel Stone <daniel at fooishbar.org>

thanks.

Cheers,
  Peter


More information about the xorg-devel mailing list