I looked into Qt and there are three locations where x and y tilt values are obtained. They are all in qapplication_x11.cpp in the function QETWidget::translateXinputEvent.
The first one is this (I have removed quite a lot of lines, check the original to be sure):
s = XQueryDeviceState(X11->display, static_cast<XDevice *>(tablet->device));
for (j = 0; j < s->num_classes; j++) {
[stuff]
if (!proximity) {
xTilt = short(vs->valuators[WAC_XTILT_I]);
yTilt = short(vs->valuators[WAC_YTILT_I]);
pressure = vs->valuators[WAC_PRESSURE_I];
So it loops over something(?) and grabs things. Then a bit later it does this:
Based on this the potential bugs are that either Qt does masked valuators wrong or the X server gives incorrect data in event structures. The xinput output mentioned above would seem to indicate that the fault lies with Qt.
I looked into Qt and there are three locations where x and y tilt values are obtained. They are all in qapplication_ x11.cpp in the function QETWidget: :translateXinpu tEvent.
The first one is this (I have removed quite a lot of lines, check the original to be sure):
s = XQueryDeviceSta te(X11- >display, static_cast<XDevice *>(tablet- >device) ); >valuators[ WAC_XTILT_ I]); >valuators[ WAC_YTILT_ I]); WAC_PRESSURE_ I];
for (j = 0; j < s->num_classes; j++) {
[stuff]
if (!proximity) {
xTilt = short(vs-
yTilt = short(vs-
pressure = vs->valuators[
So it loops over something(?) and grabs things. Then a bit later it does this:
if (motion) { >axis_data[ 3]; >axis_data[ 4];
xTilt = (short) motion-
yTilt = (short) motion-
where motion is an XDeviceMotionEvent.
Immediately afte that it does
} else if (button) { >axis_data[ 3]; >axis_data[ 4];
xTilt = (short) button-
yTilt = (short) button-
where button is an XDeviceButtonEvent.
Based on this the potential bugs are that either Qt does masked valuators wrong or the X server gives incorrect data in event structures. The xinput output mentioned above would seem to indicate that the fault lies with Qt.
Chase, what do you think?