From bd7c08c8ee25cdf154ee9a229de0c2c2ae402b35 Mon Sep 17 00:00:00 2001 From: Germano Massullo Date: Sat, 1 May 2021 15:50:39 +0200 Subject: [PATCH] adds xcb patch --- nextcloud-client.spec | 9 ++++++++- xcb.patch | 29 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 xcb.patch diff --git a/nextcloud-client.spec b/nextcloud-client.spec index bb2a3cc..8d63254 100644 --- a/nextcloud-client.spec +++ b/nextcloud-client.spec @@ -4,7 +4,7 @@ Name: nextcloud-client Version: 3.2.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Nextcloud Client # -libs are LGPLv2+, rest GPLv2 @@ -21,6 +21,9 @@ Source1: nextcloud.appdata.xml # different from the bundled one. #Patch0: %%{name}-%%{version}-syslibs.patch Patch1: nextcloud-client-picpie.patch +# Patch0: fixes GNOME quirks on Wayland sessions. Read +# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/3BVLBS4B3XHJEXFVGD7RK2ZMXZG6JQZT/ +Patch2: xcb.patch BuildRequires: check BuildRequires: chrpath @@ -149,6 +152,7 @@ The nextcloud desktop client dolphin extension. %prep %setup -q -n desktop-%{version} %patch1 -p1 +%patch2 -p1 #rm -rf src/3rdparty/qtlockedfile src/3rdparty/qtsingleapplication %build @@ -233,6 +237,9 @@ appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/nextcloud. %endif %changelog +* Sat May 01 2021 Germano Massullo - 3.2.0-2 +- added xcb.patch that fixes GNOME quirks on Wayland sessions. Read https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/3BVLBS4B3XHJEXFVGD7RK2ZMXZG6JQZT/ + * Thu Apr 08 2021 Mukundan Ragavan - 3.2.0-1 - Update to 3.2.0 diff --git a/xcb.patch b/xcb.patch new file mode 100644 index 0000000..16367fe --- /dev/null +++ b/xcb.patch @@ -0,0 +1,29 @@ +diff -urNr desktop-3.2.0-orig/src/gui/main.cpp desktop-3.2.0/src/gui/main.cpp +--- desktop-3.2.0-orig/src/gui/main.cpp 2021-04-08 09:47:24.000000000 +0200 ++++ desktop-3.2.0/src/gui/main.cpp 2021-05-01 15:48:18.194318539 +0200 +@@ -49,8 +49,25 @@ + .arg(Theme::instance()->appNameGUI())); + } + ++#ifdef Q_OS_LINUX ++void wayland_hacks() ++{ ++ // Workaround to https://github.com/ksnip/ksnip/issues/416 ++ QByteArray currentDesktop = qgetenv("XDG_CURRENT_DESKTOP").toLower(); ++ QByteArray sessionDesktop = qgetenv("XDG_SESSION_DESKTOP").toLower(); ++ QByteArray sessionType = qgetenv("XDG_SESSION_TYPE").toLower(); ++ if (sessionType.contains("wayland") && (currentDesktop.contains("gnome") || sessionDesktop.contains("gnome"))) ++ { ++ qputenv("QT_QPA_PLATFORM", "xcb"); ++ } ++} ++#endif ++ + int main(int argc, char **argv) + { ++ #ifdef Q_OS_LINUX ++ wayland_hacks(); ++ #endif + Q_INIT_RESOURCE(resources); + Q_INIT_RESOURCE(theme); +