forked from MaurycyLiebner/enve
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
217 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Qt 5.12.12 patches | ||
|
||
Patches used in releases of Friction. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- qtdeclarative/src/qmldebug/qqmlprofilerevent_p.h.orig 2023-08-27 18:42:23.217200254 +0200 | ||
+++ qtdeclarative/src/qmldebug/qqmlprofilerevent_p.h 2023-08-27 18:42:39.177914148 +0200 | ||
@@ -40,6 +40,7 @@ | ||
#ifndef QQMLPROFILEREVENT_P_H | ||
#define QQMLPROFILEREVENT_P_H | ||
|
||
+#include <limits> | ||
#include "qqmlprofilerclientdefinitions_p.h" | ||
|
||
#include <QtCore/qstring.h> | ||
--- qtdeclarative/src/qml/jsruntime/qv4regexp_p.h.orig 2023-08-27 18:28:00.494732255 +0200 | ||
+++ qtdeclarative/src/qml/jsruntime/qv4regexp_p.h 2023-08-27 18:28:11.015002704 +0200 | ||
@@ -57,7 +57,7 @@ | ||
#include <wtf/FastAllocBase.h> | ||
#include <wtf/BumpPointerAllocator.h> | ||
|
||
-#include <limits.h> | ||
+#include <limits> | ||
|
||
#include <yarr/Yarr.h> | ||
#include <yarr/YarrInterpreter.h> | ||
--- qtdeclarative/src/qml/jsruntime/qv4propertykey_p.h.orig 2023-08-27 18:25:13.146447812 +0200 | ||
+++ qtdeclarative/src/qml/jsruntime/qv4propertykey_p.h 2023-08-27 18:25:37.631072376 +0200 | ||
@@ -50,6 +50,7 @@ | ||
// We mean it. | ||
// | ||
|
||
+#include <limits> | ||
#include <private/qv4global_p.h> | ||
|
||
QT_BEGIN_NAMESPACE | ||
--- qtbase/src/corelib/global/qendian.h.orig 2023-08-27 17:57:14.217737111 +0200 | ||
+++ qtbase/src/corelib/global/qendian.h 2023-08-27 17:57:28.366116283 +0200 | ||
@@ -41,6 +41,7 @@ | ||
#ifndef QENDIAN_H | ||
#define QENDIAN_H | ||
|
||
+#include <limits> | ||
#include <QtCore/qfloat16.h> | ||
#include <QtCore/qglobal.h> | ||
|
||
--- qtbase/src/corelib/tools/qbytearraymatcher.h.orig 2023-08-27 17:58:30.455782238 +0200 | ||
+++ qtbase/src/corelib/tools/qbytearraymatcher.h 2023-08-27 17:58:42.956118008 +0200 | ||
@@ -40,6 +40,7 @@ | ||
#ifndef QBYTEARRAYMATCHER_H | ||
#define QBYTEARRAYMATCHER_H | ||
|
||
+#include <limits> | ||
#include <QtCore/qbytearray.h> | ||
|
||
QT_BEGIN_NAMESPACE |
162 changes: 162 additions & 0 deletions
162
src/patches/qt/set-has-border-in-full-screen-default.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
From f377ab8da1acb279e5b23ab1d2ef4afabe5f481c Mon Sep 17 00:00:00 2001 | ||
From: Friedemann Kleint <[email protected]> | ||
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 <[email protected]> | ||
Reviewed-by: Andy Shaw <[email protected]> | ||
(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 | ||
--- a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h | ||
+++ b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h | ||
@@ -81,6 +81,15 @@ public: | ||
func(window, border); | ||
} | ||
|
||
+ typedef void (*SetHasBorderInFullScreenDefault)(bool border); | ||
+ static const QByteArray setHasBorderInFullScreenDefaultIdentifier() { return QByteArrayLiteral("WindowsSetHasBorderInFullScreenDefault"); } | ||
+ static void setHasBorderInFullScreenDefault(bool border) | ||
+ { | ||
+ auto func = reinterpret_cast<SetHasBorderInFullScreenDefault>(QGuiApplication::platformFunction(setHasBorderInFullScreenDefaultIdentifier())); | ||
+ if (func) | ||
+ func(border); | ||
+ } | ||
+ | ||
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 | ||
--- a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc | ||
+++ b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc | ||
@@ -93,7 +93,40 @@ | ||
is true then it will enable the WS_BORDER flag in full screen mode to enable other top level windows | ||
inside the application to appear on top when required. | ||
|
||
+ \note The setting must be applied before showing the window or switching it | ||
+ to full screen. For QML, setHasBorderInFullScreenDefault() can be used to | ||
+ set a default value. | ||
+ | ||
+ See also \l [QtDoc] {Fullscreen OpenGL Based Windows} | ||
+*/ | ||
+ | ||
+/*! | ||
+ \typedef QWindowsWindowFunctions::SetHasBorderInFullScreenDefault | ||
+ \since 5.13 | ||
+ | ||
+ This is the typedef for the function returned by QGuiApplication::platformFunction | ||
+ when passed setHasBorderInFullScreenDefaultIdentifier. | ||
+*/ | ||
+ | ||
+/*! | ||
+ \fn QByteArray QWindowsWindowFunctions::setHasBorderInFullScreenDefaultIdentifier() | ||
+ \since 5.13 | ||
+ | ||
+ This function returns the bytearray that can be used to query | ||
+ QGuiApplication::platformFunction to retrieve the SetHasBorderInFullScreen function. | ||
+*/ | ||
+ | ||
+/*! | ||
+ \fn void QWindowsWindowFunctions::setHasBorderInFullScreenDefault(bool border) | ||
+ \since 5.13 | ||
+ | ||
+ This is a convenience function that can be used directly instead of resolving | ||
+ the function pointer. \a border will be relayed to the function retrieved by | ||
+ QGuiApplication. When \a border is true, the WS_BORDER flag will be set | ||
+ in full screen mode for all windows by default. | ||
+ | ||
See also \l [QtDoc] {Fullscreen OpenGL Based Windows} | ||
+ \sa setHasBorderInFullScreen() | ||
*/ | ||
|
||
/*! | ||
diff --git a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp | ||
index 05d6ac9201..eeb1aa58a3 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 | ||
return QFunctionPointer(QWindowsWindow::setTouchWindowTouchTypeStatic); | ||
if (function == QWindowsWindowFunctions::setHasBorderInFullScreenIdentifier()) | ||
return QFunctionPointer(QWindowsWindow::setHasBorderInFullScreenStatic); | ||
+ if (function == QWindowsWindowFunctions::setHasBorderInFullScreenDefaultIdentifier()) | ||
+ return QFunctionPointer(QWindowsWindow::setHasBorderInFullScreenDefault); | ||
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 | ||
--- a/src/plugins/platforms/windows/qwindowswindow.cpp | ||
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp | ||
@@ -1180,6 +1180,7 @@ QWindowCreationContext::QWindowCreationContext(const QWindow *w, | ||
|
||
const char *QWindowsWindow::embeddedNativeParentHandleProperty = "_q_embedded_native_parent_handle"; | ||
const char *QWindowsWindow::hasBorderInFullScreenProperty = "_q_has_border_in_fullscreen"; | ||
+bool QWindowsWindow::m_borderInFullScreenDefault = false; | ||
|
||
QWindowsWindow::QWindowsWindow(QWindow *aWindow, const QWindowsWindowData &data) : | ||
QWindowsBaseWindow(aWindow), | ||
@@ -1217,7 +1218,7 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const QWindowsWindowData &data) | ||
|
||
if (aWindow->isTopLevel()) | ||
setWindowIcon(aWindow->icon()); | ||
- if (aWindow->property(hasBorderInFullScreenProperty).toBool()) | ||
+ if (m_borderInFullScreenDefault || aWindow->property(hasBorderInFullScreenProperty).toBool()) | ||
setFlag(HasBorderInFullScreen); | ||
clearFlag(WithinCreate); | ||
} | ||
@@ -2820,6 +2821,11 @@ void QWindowsWindow::setHasBorderInFullScreenStatic(QWindow *window, bool border | ||
window->setProperty(hasBorderInFullScreenProperty, QVariant(border)); | ||
} | ||
|
||
+void QWindowsWindow::setHasBorderInFullScreenDefault(bool border) | ||
+{ | ||
+ m_borderInFullScreenDefault = border; | ||
+} | ||
+ | ||
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 | ||
--- a/src/plugins/platforms/windows/qwindowswindow.h | ||
+++ b/src/plugins/platforms/windows/qwindowswindow.h | ||
@@ -341,6 +341,7 @@ public: | ||
static void setTouchWindowTouchTypeStatic(QWindow *window, QWindowsWindowFunctions::TouchWindowTouchTypes touchTypes); | ||
void registerTouchWindow(QWindowsWindowFunctions::TouchWindowTouchTypes touchTypes = QWindowsWindowFunctions::NormalTouch); | ||
static void setHasBorderInFullScreenStatic(QWindow *window, bool border); | ||
+ static void setHasBorderInFullScreenDefault(bool border); | ||
void setHasBorderInFullScreen(bool border); | ||
static QString formatWindowTitle(const QString &title); | ||
|
||
@@ -386,6 +387,7 @@ private: | ||
// note: intentionally not using void * in order to avoid breaking x86 | ||
VkSurfaceKHR m_vkSurface = 0; | ||
#endif | ||
+ static bool m_borderInFullScreenDefault; | ||
}; | ||
|
||
#ifndef QT_NO_DEBUG_STREAM | ||
-- | ||
2.18.0.windows.1 | ||
|