[RFC] X Input Driver specification

Simon Thum simon.thum at mni.fh-giessen.de
Tue Apr 10 14:26:37 PDT 2007


Hi Magnus,

thanks for answering my newbie questions (and reviewing my patch!).
It is now clear to me such concerns are out of scope for your proposal.

Maybe I did'nt make it clear, my concern is the following:
As you can see in my patch, ApplyExtendedValuatorSettings() is more or 
less a hack which links (backend-specific, I presume) configuration data 
into dix. From an aesthetical (or sw engineering) POV, this should be 
done in the backend. But none of the functions there got called with the 
valuators initialized, if at all.
Except for xf86InitValuatorAxisStruct ;)
So, I thinks I have the following alternatives:
1) current hack
2) handcrafted, incomplete but better-suited callback
3) someone who has X(input) experience tells me how to do better
4) I'm missing something

3) was what I thought what would do good in your proposal, but it 
doesn't seem to suit there.
Maybe you can suggest me something? Even if I'm the only use case, I 
think backends should have a chance to react on device 
additions/removals without relying on such tinkering.

Also, on subpixel motions, a grep told me aiptek and acecad
are WACOM-related, but I didn't see where subpixel events get generated. 
Is this the right spot anyway?

best regards,

Simon

Magnus Vigerlöf wrote:
> On Thursday 05 April 2007 22:39, Simon Thum wrote:
>> Hi Magnus,
>>
>> I'm in charge of bug#8583, which would benefit from some single point
>> that would be called on device init (or just before). Currently my
>> integration is a little hacky and I think I've seen other code which
>> might be better placed in such a function.
> 
> Currently (even without my patch-set) the xserver will call PreInit and 
> DEVICE_INIT at startup and at an input device hotplug add request, it will 
> also call DEVICE_ON in that case. DEVICE_ON/OFF will be called at every 
> VT-switch as well, maybe one/several of these points is good enough?
> 
>> What I have in mind is a single point (in DIX as well as backends) to
>> perform device-class specific stuff just before the device comes to action.
>> Maybe I just missed it, but I haven't seen something like that in the
>> code and your proposal. So I'd just like to suggest it :)
> 
> If there's a need to make changes in DIX, maybe the functions that make the 
> actual calls for DEVICE_* would be a suitable place? In DEVICE_INIT you will 
> have access to all structures that will be allocated for the input device by 
> the core part of the xserver, so that's the last place you may have to make 
> device-specific initialization of the allocated structures.
> 
> ActivateDevice [+187 dix/devices.c] (DEVICE_INIT)
> EnableDevice [+142 dix/devices.c] (DEVICE_ON)
> DisableDevice [+168 dix/devices.c] (DEVICE_OFF)
> CloseDevice [+408 dix/devices.c] (DEVICE_CLOSE)
> 
> I hope the current callbacks will prove sufficient for your needs.
> 
> 
> The proposal is more a try to define what the xserver does in the current 
> implementation so that the different input devices knows what they should be 
> doing at the different callbacks, rather than to try to introduce changes to 
> the interface. The wacom driver (at least) seems to have suffered from this 
> lack of a spec, and my gut tells me that we're not the only one that might be 
> affected by this.
> 
> Cheers
>  Magnus V
> 




More information about the xorg mailing list