Commit ddfccd78 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Rebase patch on Qt 5.12.3

parent e96c95fb
From bf5a6693654afedd05a36d9605fce95f69b70e23 Mon Sep 17 00:00:00 2001
From: Dmitry Kazakov <dimula73@gmail.com>
Date: Mon, 11 Mar 2019 13:18:06 +0300
Subject: [PATCH 20/22] Synthesize Enter/LeaveEvent for accepted QTabletEvent
When the tablet event is accepted, then Qt doesn't synthesize a mouse
event, it means that QApplicationPrivate::sendMouseEvent() will not be
called, and, therefore, enter/leave events will not be dispatched.
The patch looks a bit hackish. Ideally, the synthesize should happen
in QGuiApplicationPrivate::processTabletEvent(), which takes the decision
about synthesizing mouse events. But there is not enough information
on this level: neither qt_last_mouse_receiver nor the receiver widget
are known at this stage.
On Windows and other platforms where there is a parallel stream of
mouse events synthesized by the platform, we shouldn't generate these
events manually.
Change-Id: Ifbad6284483ee282ad129db54606f5d0d9ddd633
---
src/widgets/kernel/qwidgetwindow.cpp | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index e9b749d7c2..00c1e8e92f 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -1053,6 +1053,18 @@ void QWidgetWindow::handleTabletEvent(QTabletEvent *event)
diff --git a/qtbase/src/widgets/kernel/qwidgetwindow.cpp b/qtbase/src/widgets/kernel/qwidgetwindow.cpp
index fbc71cd0e..729a7f701 100644
--- a/qtbase/src/widgets/kernel/qwidgetwindow.cpp
+++ b/qtbase/src/widgets/kernel/qwidgetwindow.cpp
@@ -1051,6 +1051,18 @@ void QWidgetWindow::handleTabletEvent(QTabletEvent *event)
event->setAccepted(ev.isAccepted());
}
......@@ -45,6 +21,3 @@ index e9b749d7c2..00c1e8e92f 100644
if (event->type() == QEvent::TabletRelease && event->buttons() == Qt::NoButton)
qt_tablet_target = 0;
}
--
2.20.1.windows.1
From f377ab8da1acb279e5b23ab1d2ef4afabe5f481c Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
Date: Wed, 21 Nov 2018 09:06:50 +0100
Subject: [PATCH] Windows: Add a default setting for hasBorderInFullScreen
The hasBorderInFullScreen only has an effect when set before
the window is shown or switched to fullscreen. This is currently
not possible in the QML case since the window is only accessible
after all properties (including visibility) have been set.
Add a function to set a default value.
[ChangeLog][QtPlatformHeaders][QWindowsWindowFunctions] Add a default
setting for hasBorderInFullScreen
Task-number: QTBUG-47247
Task-number: QTBUG-71855
Change-Id: I3952e3f34bc4eb134cf1c5265b4489fc74112688
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit 7264bf19dbc47b805bb7af5df584ce1aae081962)
---
.../qwindowswindowfunctions.h | 9 +++++
.../qwindowswindowfunctions.qdoc | 33 +++++++++++++++++++
.../windows/qwindowsnativeinterface.cpp | 2 ++
.../platforms/windows/qwindowswindow.cpp | 8 ++++-
.../platforms/windows/qwindowswindow.h | 2 ++
5 files changed, 53 insertions(+), 1 deletion(-)
diff --git a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h
index e51c2fde67..032dcafa6e 100644
diff --git a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h b/qtbase/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h
index e51c2fde6..032dcafa6 100644
--- a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h
+++ b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h
@@ -81,6 +81,15 @@ public:
......@@ -46,8 +18,8 @@ index e51c2fde67..032dcafa6e 100644
typedef void (*SetWindowActivationBehaviorType)(WindowActivationBehavior);
static const QByteArray setWindowActivationBehaviorIdentifier() { return QByteArrayLiteral("WindowsSetWindowActivationBehavior"); }
diff --git a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc
index a52bbe061b..0c52cde753 100644
diff --git a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc b/qtbase/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc
index a52bbe061..0c52cde75 100644
--- a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc
+++ b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc
@@ -93,7 +93,40 @@
......@@ -91,11 +63,11 @@ index a52bbe061b..0c52cde753 100644
*/
/*!
diff --git a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
index 05d6ac9201..eeb1aa58a3 100644
diff --git a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp b/qtbase/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
index ed945ec4b..9003e94c5 100644
--- a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
+++ b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
@@ -293,6 +293,8 @@ QFunctionPointer QWindowsNativeInterface::platformFunction(const QByteArray &fun
@@ -277,6 +277,8 @@ QFunctionPointer QWindowsNativeInterface::platformFunction(const QByteArray &fun
return QFunctionPointer(QWindowsWindow::setTouchWindowTouchTypeStatic);
if (function == QWindowsWindowFunctions::setHasBorderInFullScreenIdentifier())
return QFunctionPointer(QWindowsWindow::setHasBorderInFullScreenStatic);
......@@ -104,11 +76,11 @@ index 05d6ac9201..eeb1aa58a3 100644
if (function == QWindowsWindowFunctions::setWindowActivationBehaviorIdentifier())
return QFunctionPointer(QWindowsNativeInterface::setWindowActivationBehavior);
if (function == QWindowsWindowFunctions::isTabletModeIdentifier())
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 910d8dd209..9705eb7293 100644
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/qtbase/src/plugins/platforms/windows/qwindowswindow.cpp
index 0376e363f..338e594c7 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1180,6 +1180,7 @@ QWindowCreationContext::QWindowCreationContext(const QWindow *w,
@@ -1183,6 +1183,7 @@ QWindowCreationContext::QWindowCreationContext(const QWindow *w,
const char *QWindowsWindow::embeddedNativeParentHandleProperty = "_q_embedded_native_parent_handle";
const char *QWindowsWindow::hasBorderInFullScreenProperty = "_q_has_border_in_fullscreen";
......@@ -116,7 +88,7 @@ index 910d8dd209..9705eb7293 100644
QWindowsWindow::QWindowsWindow(QWindow *aWindow, const QWindowsWindowData &data) :
QWindowsBaseWindow(aWindow),
@@ -1217,7 +1218,7 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const QWindowsWindowData &data)
@@ -1220,7 +1221,7 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const QWindowsWindowData &data)
if (aWindow->isTopLevel())
setWindowIcon(aWindow->icon());
......@@ -125,7 +97,7 @@ index 910d8dd209..9705eb7293 100644
setFlag(HasBorderInFullScreen);
clearFlag(WithinCreate);
}
@@ -2820,6 +2821,11 @@ void QWindowsWindow::setHasBorderInFullScreenStatic(QWindow *window, bool border
@@ -2819,6 +2820,11 @@ void QWindowsWindow::setHasBorderInFullScreenStatic(QWindow *window, bool border
window->setProperty(hasBorderInFullScreenProperty, QVariant(border));
}
......@@ -137,11 +109,11 @@ index 910d8dd209..9705eb7293 100644
void QWindowsWindow::setHasBorderInFullScreen(bool border)
{
if (testFlag(HasBorderInFullScreen) == border)
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h
index b9b398b67b..b07bd15d2a 100644
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/qtbase/src/plugins/platforms/windows/qwindowswindow.h
index 2675990cf..0d8096ddf 100644
--- a/src/plugins/platforms/windows/qwindowswindow.h
+++ b/src/plugins/platforms/windows/qwindowswindow.h
@@ -341,6 +341,7 @@ public:
@@ -342,6 +342,7 @@ public:
static void setTouchWindowTouchTypeStatic(QWindow *window, QWindowsWindowFunctions::TouchWindowTouchTypes touchTypes);
void registerTouchWindow(QWindowsWindowFunctions::TouchWindowTouchTypes touchTypes = QWindowsWindowFunctions::NormalTouch);
static void setHasBorderInFullScreenStatic(QWindow *window, bool border);
......@@ -149,7 +121,7 @@ index b9b398b67b..b07bd15d2a 100644
void setHasBorderInFullScreen(bool border);
static QString formatWindowTitle(const QString &title);
@@ -386,6 +387,7 @@ private:
@@ -387,6 +388,7 @@ private:
// note: intentionally not using void * in order to avoid breaking x86
VkSurfaceKHR m_vkSurface = 0;
#endif
......@@ -157,6 +129,3 @@ index b9b398b67b..b07bd15d2a 100644
};
#ifndef QT_NO_DEBUG_STREAM
--
2.18.0.windows.1
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