Smooth scrolling again
Max Schwarz
Max at x-quadraht.de
Sun Nov 14 09:51:43 PST 2010
Hi Simon,
> > The clients depend on XIDeviceChangedEvents anyway to acquire the new
> > resolution when the user switches input devices (see pscrolltest.c).
>
> Though that sounds fine, I think the event is intended for master/slave
> issues. That's deep in spec land, however. Read up and see if it fits.
From the spec:
-- A DeviceChangeEvent is sent whenever a device changes it's capabilities.
-- This can happen either by a new slave device sending events through a
-- master device, or by a physical device changing capabilities at runtime.
Seems fine to me. New Slave = User switched input devices,
Capabilities = Changed resolution.
To the client it's the same thing anyway, it needs to check wether the new
device supports pscroll and get the changed resolution.
> > Are the drivers "allowed" to access the valuator structure
> > (e.g. dev->valuator->axis[0].resolution = XY) or should I implement
> > wrapper functions in the server to do that?
>
> It depends on whether the server can operate properly without wrappers,
> i.e. whether some complex state needs wrangling. In that particular
> case, I'm leaning slightly towards wrapping.
That would mean something like
xf86SetValuatorAxisResolution(DeviceIntPtr dev, int axnum, int min, int max,
int current)?
This method could directly send out the DeviceChangedEvent. Would that still
be a layer violation?
I'll add that to my patch in the next days.
> But in general, I don't mind being pestered if something usable seems
> likely to emerge from it.
Thanks ;-)
Max
More information about the xorg-devel
mailing list