diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-02-04 20:31:52 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-02-10 21:02:06 +0000 |
commit | 2872b519b61f76793a05d5176269d690465cf396 (patch) | |
tree | 73a5f0288cdd129bd524fec2477cc3527d825668 /src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | |
parent | 620c83f234473f612a0e830b98044965ba9a487c (diff) |
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 ce2fe90faad84a6e3a976a6f111a0fa4883937d9 vci was of type
XIValuatorClassInfo; then 7499d4404f9eb7223674cd0523f35eff1be7c1c9
changed it to our ValuatorClassInfo struct, but didn't add the lookup
indirection to this qCDebug.
Change-Id: Ib6107f17d6c6c209573e3df54149d6cfffc0b8b6
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 49d30801553c18a5ec8a671eade2979da5a3aa1b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection_xi2.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp index 752f63eb16..13104f52e2 100644 --- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp @@ -645,7 +645,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) |