Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Krita
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Miguel Lopez
Krita
Commits
6a16d6c4
Commit
6a16d6c4
authored
Jun 04, 2019
by
Halla Rempt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update this patch so it applies cleanly to 5.12.3
parent
069a657a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
26 deletions
+62
-26
3rdparty/ext_qt/0050-Fix-using-tablet-on-QML-widgets.patch
3rdparty/ext_qt/0050-Fix-using-tablet-on-QML-widgets.patch
+62
-26
No files found.
3rdparty/ext_qt/0050-Fix-using-tablet-on-QML-widgets.patch
View file @
6a16d6c4
From bb58e3fda70d83f696f1183defc93e6501a69c55 Mon Sep 17 00:00:00 2001
From: Dmitry Kazakov <dimula73@gmail.com>
Date: Wed, 15 May 2019 19:39:44 +0300
Subject: [PATCH 1/2] 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.
See bug: https://bugs.kde.org/show_bug.cgi?id=406668
---
src/plugins/platforms/windows/qwindowspointerhandler.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/plugins/platforms/windows/qwindowspointerhandler.cpp b/src/plugins/platforms/windows/qwindowspointerhandler.cpp
index 190fb208..07f4d41e 100644
--- a/src/plugins/platforms/windows/qwindowspointerhandler.cpp
+++ b/src/plugins/platforms/windows/qwindowspointerhandler.cpp
@@ -627,14 +627,16 @@
bool QWindowsPointerHandler::translatePenEvent(QWindow *window, HWND hwnd, QtWin
diff --git a/qtbase/src/plugins/platforms/windows/qwindowspointerhandler.cpp b/qtbase/src/plugins/platforms/windows/qwindowspointerhandler.cpp
index 9a8b5d512..4a8322337 100644
--- a/qtbase/src/plugins/platforms/windows/qwindowspointerhandler.cpp
+++ b/qtbase/src/plugins/platforms/windows/qwindowspointerhandler.cpp
@@ -639,14 +639,16 @@
bool QWindowsPointerHandler::translatePenEvent(QWindow *window, HWND hwnd, QtWin
#endif
}
...
...
@@ -38,7 +21,7 @@ index 190fb208..07f4d41e 100644
}
bool QWindowsPointerHandler::translateMouseWheelEvent(QWindow *window,
@@ -7
05,7 +707
,7 @@
bool QWindowsPointerHandler::translateMouseEvent(QWindow *window,
@@ -7
16,7 +718
,7 @@
bool QWindowsPointerHandler::translateMouseEvent(QWindow *window,
}
Qt::MouseEventSource source = Qt::MouseEventNotSynthesized;
...
...
@@ -47,6 +30,59 @@ index 190fb208..07f4d41e 100644
if (QWindowsIntegration::instance()->options() & QWindowsIntegration::DontPassOsMouseEventsSynthesizedFromTouch)
return false;
source = Qt::MouseEventSynthesizedBySystem;
--
2.20.1.windows.1
diff --git a/qtbase/src/plugins/platforms/windows/qwindowstabletsupport.cpp b/qtbase/src/plugins/platforms/windows/qwindowstabletsupport.cpp
index fa209f09c..462be8b3f 100644
--- a/qtbase/src/plugins/platforms/windows/qwindowstabletsupport.cpp
+++ b/qtbase/src/plugins/platforms/windows/qwindowstabletsupport.cpp
@@ -434,6 +434,14 @@
bool QWindowsTabletSupport::translateTabletProximityEvent(WPARAM /* wParam */, L
if (m_currentDevice < 0) {
m_currentDevice = m_devices.size();
m_devices.push_back(tabletInit(uniqueId, cursorType));
+ } else {
+ /**
+ * The user can switch pressure sensitivity level in the driver,
+ * which will make our saved values invalid (this option is
+ * provided by Wacom drivers for compatibility reasons, and
+ * it can be adjusted on the fly)
+ */
+ m_devices[m_currentDevice] = tabletInit(uniqueId, cursorType);
}
m_devices[m_currentDevice].currentPointerType = pointerType(currentCursor);
m_state = PenProximity;
@@ -454,7 +462,6 @@
bool QWindowsTabletSupport::translateTabletPacketEvent()
return false;
const int currentDevice = m_devices.at(m_currentDevice).currentDevice;
- const int currentPointer = m_devices.at(m_currentDevice).currentPointerType;
const qint64 uniqueId = m_devices.at(m_currentDevice).uniqueId;
// The tablet can be used in 2 different modes (reflected in enum Mode),
@@ -484,6 +491,28 @@
bool QWindowsTabletSupport::translateTabletPacketEvent()
for (int i = 0; i < packetCount ; ++i) {
const PACKET &packet = localPacketBuf[i];
+ int currentPointer = m_devices.at(m_currentDevice).currentPointerType;
+
+ const int packetPointerType = pointerType(packet.pkCursor);
+ if (!packet.pkButtons && packetPointerType != currentPointer) {
+
+ QWindowSystemInterface::handleTabletLeaveProximityEvent(packet.pkTime,
+ m_devices.at(m_currentDevice).currentDevice,
+ m_devices.at(m_currentDevice).currentPointerType,
+ m_devices.at(m_currentDevice).uniqueId);
+
+
+
+ m_devices[m_currentDevice].currentPointerType = packetPointerType;
+
+ QWindowSystemInterface::handleTabletEnterProximityEvent(packet.pkTime,
+ m_devices.at(m_currentDevice).currentDevice,
+ m_devices.at(m_currentDevice).currentPointerType,
+ m_devices.at(m_currentDevice).uniqueId);
+
+ currentPointer = packetPointerType;
+ }
+
const int z = currentDevice == QTabletEvent::FourDMouse ? int(packet.pkZ) : 0;
QPointF globalPosF =
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment