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

--- Comment #4 from Dmitry Kazakov <dimul...@gmail.com> ---
Git commit d684bc557d4fe1782d78896d007fb75ecf6c0bf1 by Dmitry Kazakov.
Committed on 16/05/2019 at 09:08.
Pushed by dkazakov into branch 'master'.

Add workaround for handling table press correctly in WinInk mode

Original problem: widgets do not get synthesized mouse-down and
mouse-press events until the stylus is released

Reason: if the app accepts the event, WndProc should report
that to the system (by returning true). This is the only way to
prevent Windows from starting some system-wide gestures, like
click+hold -> right button click. If we ignore the event, then
OS postpones all synthesized mouse events until the entire gesture
is completed.

The patch implements a "hackish" workaround for the original problem
by using the following rules:

1) All tablet-move events are ignored (without synthesized mouse events
   OS doesn't generate any Enter/Leave events)

2) All not-accepted tablet press- and release-events and also reported as
   ignored (without it D&D doesn't work).

3) All accepted tablet press- and release-events are reported as "accepted",
   **but** we artificially synthesize mouse events for them.

TODO: there are still two problems:

1) Perhaps this synthesizeMouseEvent() is not needed at all. But we should
   first check if Qt relies on these synthesized messages anywhere in the
   code or not.

2) If we still keep synthesizeMouseEvent(), then it should fetch actual
   tablet buttons from QGuiApplicationPrivate::tabletDevicePoint(). Right
   now it always synthesizes left-click, whatever the button was pressed/
   released.

A  +243  -0   
3rdparty/ext_qt/0051-Add-workaround-for-handling-table-press-correctly-in.patch
M  +1    -0    3rdparty/ext_qt/CMakeLists.txt
M  +17   -0    plugins/dockers/touchdocker/TouchDockerDock.cpp
M  +2    -0    plugins/dockers/touchdocker/TouchDockerDock.h

https://invent.kde.org/kde/krita/commit/d684bc557d4fe1782d78896d007fb75ecf6c0bf1

--- Comment #5 from Dmitry Kazakov <dimul...@gmail.com> ---
Git commit 8dd4d8b98361eab3acfa7a6f05d7b38fc532d0de by Dmitry Kazakov.
Committed on 16/05/2019 at 09:08.
Pushed by dkazakov into branch 'master'.

Fix using tablet on QML widgets

In previous versions of Qt (wintab impeplementation) the events were
marked by Qt::MouseEventSynthesizedBySystem flag only when they were
synthesized from touch, not from tablet events. This is what
QWindowsTabletSupport does and what QQuickWindow expects (it
filters out all synthesized events). This patch recovers the old behavior
for the new QWindowsPointerHandler tablet API implementation.

A  +52   -0    3rdparty/ext_qt/0050-Fix-using-tablet-on-QML-widgets.patch
M  +1    -0    3rdparty/ext_qt/CMakeLists.txt

https://invent.kde.org/kde/krita/commit/8dd4d8b98361eab3acfa7a6f05d7b38fc532d0de

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

Reply via email to