xcb: add qt.qpa.input.events logging of wheel events
This is comparable to what we do on macOS, except that the scroll phase and inverted state are missing. Task-number: QTBUG-38570 Task-number: QTBUG-56075 Change-Id: I27502e1e2667317ab701f30f1fc601ae1e0591d0 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>bb10
parent
be0a6ab4c8
commit
af837f9647
|
|
@ -1040,6 +1040,7 @@ void QXcbConnection::xi2HandleScrollEvent(void *event, ScrollingDevice &scrollin
|
|||
std::swap(angleDelta.rx(), angleDelta.ry());
|
||||
std::swap(rawDelta.rx(), rawDelta.ry());
|
||||
}
|
||||
qCDebug(lcQpaXInputEvents) << "scroll wheel @ window pos" << local << "delta px" << rawDelta << "angle" << angleDelta;
|
||||
QWindowSystemInterface::handleWheelEvent(platformWindow->window(), xiEvent->time, local, global, rawDelta, angleDelta, modifiers);
|
||||
}
|
||||
}
|
||||
|
|
@ -1065,6 +1066,7 @@ void QXcbConnection::xi2HandleScrollEvent(void *event, ScrollingDevice &scrollin
|
|||
Qt::KeyboardModifiers modifiers = keyboard()->translateModifiers(xiDeviceEvent->mods.effective_mods);
|
||||
if (modifiers & Qt::AltModifier)
|
||||
std::swap(angleDelta.rx(), angleDelta.ry());
|
||||
qCDebug(lcQpaXInputEvents) << "scroll wheel (button" << xiDeviceEvent->detail << ") @ window pos" << local << "delta angle" << angleDelta;
|
||||
QWindowSystemInterface::handleWheelEvent(platformWindow->window(), xiEvent->time, local, global, QPoint(), angleDelta, modifiers);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue