xcb: Show valuator atom names properly in categorized logging
During a touch update, this looked questionable since I don't have any
barcode readers or buttonboxes attached:
XI2 touch event type 19 seq 1481 detail 193 pos 116.3, 77.8 root pos 6476.3, 2941.8 on window 3e00006
valuator BARCODE value 47796.365791 from range 0.000000 -> 65535.000000
valuator BUTTONBOX value 59504.858830 from range 0.000000 -> 65535.000000
touchpoint 193 state QEventPoint::Updated pos norm QPointF(0.729326,0.907986) area QRectF(...
After the fix it's like this:
XI2 touch event type 19 seq 1235 detail 201 pos 154.0, 64.3 root pos 6168.0, 2794.3 on window 5000006
valuator Abs MT Position X value 45520.589958 from range 0.000000 -> 65535.000000
valuator Abs MT Position Y value 56519.790001 from range 0.000000 -> 65535.000000
touchpoint 201 state QEventPoint::Updated pos norm QPointF(0.6946,0.862437) area QRectF(...
ValuatorClassInfo's QXcbAtom::Atom is a Qt enum, which has to be
converted to xcb_atom_t before we can call xcb_get_atom_name_name.
Originally in ce2fe90faa vci was of type
XIValuatorClassInfo; then 7499d4404f
changed it to our ValuatorClassInfo struct, but didn't add the lookup
indirection to this qCDebug.
Pick-to: 5.15 6.2 6.3
Change-Id: Ib6107f17d6c6c209573e3df54149d6cfffc0b8b6
Reviewed-by: Liang Qi <liang.qi@qt.io>
bb10
parent
cf2ec5a5fc
commit
49d3080155
|
|
@ -820,7 +820,7 @@ void QXcbConnection::xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindo
|
|||
continue;
|
||||
if (Q_UNLIKELY(lcQpaXInputEvents().isDebugEnabled()))
|
||||
qCDebug(lcQpaXInputEvents, " valuator %20s value %lf from range %lf -> %lf",
|
||||
atomName(vci.label).constData(), value, vci.min, vci.max);
|
||||
atomName(atom(vci.label)).constData(), value, vci.min, vci.max);
|
||||
if (value > vci.max)
|
||||
value = vci.max;
|
||||
if (value < vci.min)
|
||||
|
|
|
|||
Loading…
Reference in New Issue