-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from flathub/wip/wayland
Enable Wayland support in Qt, use it if available
- Loading branch information
Showing
3 changed files
with
106 additions
and
1 deletion.
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
43 changes: 43 additions & 0 deletions
43
patches/backports/Fix-installing-qtwayland-without-qtquick-or-opengl-s.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,43 @@ | ||
From: Kai Koehne <[email protected]> | ||
Date: Tue, 3 Mar 2020 16:30:11 +0100 | ||
Subject: Fix installing qtwayland without qtquick or opengl support | ||
|
||
Unconditionally generate qwayland-server-qt-texture-sharing-unstable-v1.h, | ||
even if the header file will not be used. It is listed in syncqt.profile though, | ||
and because of | ||
|
||
private_headers.CONFIG += no_check_exist | ||
|
||
in extensions.pri qmake will unconditionally generate an install rule. | ||
|
||
Fixes: QTBUG-82569 | ||
Change-Id: I5125382f1e4fc61936515e045a7e6a4a3c608451 | ||
Reviewed-by: Joerg Bornemann <[email protected]> | ||
Origin: upstream, commit:0f0fbf0a70940379a99618d2069721471e3fc631 | ||
--- | ||
src/compositor/extensions/extensions.pri | 4 +--- | ||
1 file changed, 1 insertion(+), 3 deletions(-) | ||
|
||
diff --git a/src/compositor/extensions/extensions.pri b/src/compositor/extensions/extensions.pri | ||
index 61ab043e..06e3ef9e 100644 | ||
--- a/src/compositor/extensions/extensions.pri | ||
+++ b/src/compositor/extensions/extensions.pri | ||
@@ -8,6 +8,7 @@ WAYLANDSERVERSOURCES += \ | ||
../extensions/touch-extension.xml \ | ||
../extensions/qt-key-unstable-v1.xml \ | ||
../extensions/qt-windowmanager.xml \ | ||
+ ../extensions/qt-texture-sharing-unstable-v1.xml \ | ||
../3rdparty/protocol/text-input-unstable-v2.xml \ | ||
../3rdparty/protocol/viewporter.xml \ | ||
../3rdparty/protocol/scaler.xml \ | ||
@@ -96,9 +97,6 @@ qtHaveModule(quick) { | ||
extensions/qwaylandxdgshellintegration.cpp \ | ||
|
||
qtConfig(opengl) { | ||
- WAYLANDSERVERSOURCES += \ | ||
- ../extensions/qt-texture-sharing-unstable-v1.xml | ||
- | ||
HEADERS += \ | ||
extensions/qwltexturesharingextension_p.h | ||
|
||
-- |
40 changes: 40 additions & 0 deletions
40
patches/org.kde.Sdk/qtwayland-use-gnome-platform-theme-on-gnome-based-desktops.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,40 @@ | ||
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp | ||
index 97e0203c..5bee160a 100644 | ||
--- a/src/client/qwaylandintegration.cpp | ||
+++ b/src/client/qwaylandintegration.cpp | ||
@@ -99,20 +99,26 @@ public: | ||
|
||
if (QGuiApplication::desktopSettingsAware()) { | ||
const QByteArray desktopEnvironment = QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment(); | ||
- | ||
+ QList<QByteArray> gtkBasedEnvironments; | ||
+ gtkBasedEnvironments << "GNOME" | ||
+ << "X-CINNAMON" | ||
+ << "UNITY" | ||
+ << "MATE" | ||
+ << "XFCE" | ||
+ << "LXDE"; | ||
if (desktopEnvironment == QByteArrayLiteral("KDE")) { | ||
#if QT_CONFIG(settings) | ||
result.push_back(QStringLiteral("kde")); | ||
#endif | ||
- } else if (!desktopEnvironment.isEmpty() && | ||
- desktopEnvironment != QByteArrayLiteral("UNKNOWN") && | ||
- desktopEnvironment != QByteArrayLiteral("GNOME") && | ||
- desktopEnvironment != QByteArrayLiteral("UNITY") && | ||
- desktopEnvironment != QByteArrayLiteral("MATE") && | ||
- desktopEnvironment != QByteArrayLiteral("XFCE") && | ||
- desktopEnvironment != QByteArrayLiteral("LXDE")) | ||
+ } else if (gtkBasedEnvironments.contains(desktopEnvironment)) { | ||
+ // prefer the GTK3 theme implementation with native dialogs etc. | ||
+ result.push_back(QStringLiteral("gtk3")); | ||
+ // fallback to the generic Gnome theme if loading the GTK3 theme fails | ||
+ result.push_back(QLatin1String(QGnomeTheme::name)); | ||
+ } else if (!desktopEnvironment.isEmpty() && desktopEnvironment != QByteArrayLiteral("UNKNOWN")) { | ||
// Ignore X11 desktop environments | ||
result.push_back(QString::fromLocal8Bit(desktopEnvironment.toLower())); | ||
+ } | ||
} | ||
|
||
if (result.isEmpty()) | ||
|