[RFC] Reporting of relative device events
peter at cs.unisa.edu.au
Sat May 24 01:11:51 PDT 2008
Just trying to collect some feedback and ideas here:
The following behaviour applies to X Input events ATM.
ev->root_x, ev->root_y are in screen coordinates.
ev->event_x, ev->event_y are in screen coordinates.
Each XI event is trailed by a DeviceValuator event, which contains the
valuators in the device-specific coordinate range.
This makes it a lot easier to write XI clients that don't need to care about
device-specific coordinate ranges (which will apply to virtually all clients).
Right now, valuators reported in DeviceValuator events depend on the mode of
the device. If the device is mode Absolute, the valuators are in absolute
(device-specific) coordinates. If the device is mode Relative, the valuators
are in relative (device-specific) coordinates. If I understand the specs
correctly, this is in concordance with the XI v1.0 specs.
However, I don't have a good feeling about this. For example, I think a
perfectly valid use-case may be to utilise a tablet in relative mode, but get
absolute coordinates. Also, to drop the wretched DGA extension, relative
coordinates may be desired by some clients even if the device is in absolute
Instead of the current approach, it would be better to differ between
DeviceMode and DeviceReportingMode, both independent of each other.
The next question would then be - should this be implemented as a
DeviceControl, thus globally. Or should it be implemented on a per-client
Looking at the source, both are feasable, although the latter requires
additional requests to set and/or query the mode of the device for this
client (and is generally nastier to implement).
Comments and pairs of cents appreciated.
More information about the xorg