https://bugs.kde.org/show_bug.cgi?id=473125

--- Comment #3 from Nate Graham <n...@kde.org> ---
Git commit 70678e79c908ce03cf996f2317fdac2ee0c3eb03 by Nate Graham, on behalf
of Aki Sakurai.
Committed on 17/10/2023 at 16:24.
Pushed by ngraham into branch 'master'.

Correct the misgenerated localMouseEvent

This commit fixes the issue where some parts of Qt6 widgets couldn't 
be clicked with a Wacom tablet stylus.

1. QMouseEvent is constructed with incorrect arguments.
https://doc.qt.io/qt-6/qmouseevent.html#QMouseEvent-3

The _button_ that caused the event is given as a value from the 
Qt::MouseButton enum. If the event _type_ is  MouseMove, then
the appropriate button for this event is Qt::NoButton. _buttons_
is the state of all buttons at the time of the event, _modifiers_
is the state of all keyboard modifiers.

2. Some parts of Qt widgets require a timestamp to function properly.
https://codereview.qt-project.org/c/qt/qtdeclarative/+/493020

QQuickWidget: give each mapped mouse event the same QEventPoint.
Counter-intuitively, this is done by setting the timestamp. Every
time you construct a new mouse event, you always need to call
setTimestamp() for the obvious reason: the timestamp is not a ctor
argument, but it's important for some event receivers. But the
non-obvious reason is that QMutableEventPoint::setTimestamp() has
other useful side effects: the velocity calculation is done there,
sensibly enough. But to make that possible, it also looks up the
persistent QEventPoint with the same ID as the one in the QMouseEvent,
and that's the most important to fix QTBUG-114258 specifically.
QQuickFlickablePrivate::handleMoveEvent() calculates delta as
QEventPoint::position() - mapFromGlobal(globalPressPosition()) and
then QQuickFlickablePrivate::drag() does the drag threshold check.

M  +3    -1    kstyle/oxygenwindowmanager.cpp

https://invent.kde.org/plasma/oxygen/-/commit/70678e79c908ce03cf996f2317fdac2ee0c3eb03

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to