adds xcb patch

f40
Germano Massullo 3 years ago
parent f0fb4e4389
commit bd7c08c8ee

@ -4,7 +4,7 @@
Name: nextcloud-client Name: nextcloud-client
Version: 3.2.0 Version: 3.2.0
Release: 1%{?dist} Release: 2%{?dist}
Summary: The Nextcloud Client Summary: The Nextcloud Client
# -libs are LGPLv2+, rest GPLv2 # -libs are LGPLv2+, rest GPLv2
@ -21,6 +21,9 @@ Source1: nextcloud.appdata.xml
# different from the bundled one. # different from the bundled one.
#Patch0: %%{name}-%%{version}-syslibs.patch #Patch0: %%{name}-%%{version}-syslibs.patch
Patch1: nextcloud-client-picpie.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: check
BuildRequires: chrpath BuildRequires: chrpath
@ -149,6 +152,7 @@ The nextcloud desktop client dolphin extension.
%prep %prep
%setup -q -n desktop-%{version} %setup -q -n desktop-%{version}
%patch1 -p1 %patch1 -p1
%patch2 -p1
#rm -rf src/3rdparty/qtlockedfile src/3rdparty/qtsingleapplication #rm -rf src/3rdparty/qtlockedfile src/3rdparty/qtsingleapplication
%build %build
@ -233,6 +237,9 @@ appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/nextcloud.
%endif %endif
%changelog %changelog
* Sat May 01 2021 Germano Massullo <germano.massullo@gmail.com> - 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 <nonamedotc@fedoraproject.org> - 3.2.0-1 * Thu Apr 08 2021 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 3.2.0-1
- Update to 3.2.0 - Update to 3.2.0

@ -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);
Loading…
Cancel
Save