From 2872b519b61f76793a05d5176269d690465cf396 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 4 Feb 2022 20:31:52 +0100 Subject: 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 (cherry picked from commit 49d30801553c18a5ec8a671eade2979da5a3aa1b) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/xcb/qxcbconnection_xi2.cpp') 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) -- cgit v1.2.3