Commit 68a1eb78 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Remove QML+WinInk workaround patch (Qt 5.12.5 fixed the bug)

parent e284cdf6
From 8281d9ff26581797bf489d937824f2142f97b027 Mon Sep 17 00:00:00 2001
From: Dmitry Kazakov <dimula73@gmail.com>
Date: Wed, 15 May 2019 19:39:44 +0300
Subject: [PATCH 2/3] 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 fd3d711470..bf201b87e0 100644
--- a/src/plugins/platforms/windows/qwindowspointerhandler.cpp
+++ b/src/plugins/platforms/windows/qwindowspointerhandler.cpp
@@ -648,14 +648,16 @@ bool QWindowsPointerHandler::translatePenEvent(QWindow *window, HWND hwnd, QtWin
#endif
}
-static inline bool isMouseEventSynthesizedFromPenOrTouch()
+static inline bool isMouseEventSynthesizedFromPen()
{
// For details, see
// https://docs.microsoft.com/en-us/windows/desktop/tablet/system-events-and-mouse-messages
const LONG_PTR SIGNATURE_MASK = 0xFFFFFF00;
const LONG_PTR MI_WP_SIGNATURE = 0xFF515700;
- return ((::GetMessageExtraInfo() & SIGNATURE_MASK) == MI_WP_SIGNATURE);
+ const quint64 extraInfo = ::GetMessageExtraInfo();
+
+ return ((extraInfo & SIGNATURE_MASK) == MI_WP_SIGNATURE) && (extraInfo & 0x80);
}
bool QWindowsPointerHandler::translateMouseWheelEvent(QWindow *window,
@@ -725,7 +727,7 @@ bool QWindowsPointerHandler::translateMouseEvent(QWindow *window,
}
Qt::MouseEventSource source = Qt::MouseEventNotSynthesized;
- if (isMouseEventSynthesizedFromPenOrTouch()) {
+ if (isMouseEventSynthesizedFromPen()) {
if (QWindowsIntegration::instance()->options() & QWindowsIntegration::DontPassOsMouseEventsSynthesizedFromTouch)
return false;
source = Qt::MouseEventSynthesizedBySystem;
--
2.20.1.windows.1
......@@ -53,10 +53,6 @@ if (WIN32)
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0026-Fetch-mapped-screen-size-from-the-Wintab-driver.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0027-Switch-stylus-pointer-type-when-the-tablet-is-in-the.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0028-Fix-updating-tablet-pressure-resolution-on-every-pro.patch
# recover this patch broken after update to 5.12.5
#COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0050-Fix-using-tablet-on-QML-widgets.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0051-Add-workaround-for-handling-table-press-correctly-in.patch
)
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment