Rebased to 6ca112b snapshot with Wayland crash fixes.

f39
Vitaly Zaitsev 5 years ago
parent 6b88221133
commit e121686589
No known key found for this signature in database
GPG Key ID: BF99FC6DD45AB90A

1
.gitignore vendored

@ -11,3 +11,4 @@ goldendict-415f35e.tar.gz
/goldendict-c53fe1c64061c7285b7451ff48089d443721c2a9.tar.gz
/goldendict-353ea1793ed430193ce586e57c560867e4a2a55b.tar.gz
/goldendict-a1c7c5b3762c292c2620af41428c3c6c3f758f04.tar.gz
/goldendict-6ca112b797e70774d252b3635d41b4c5d38ea9dd.tar.gz

@ -1,48 +0,0 @@
From 6ca112b797e70774d252b3635d41b4c5d38ea9dd Mon Sep 17 00:00:00 2001
From: Vitaly Zaitsev <vitaly@easycoding.org>
Date: Fri, 27 Mar 2020 11:08:52 +0100
Subject: [PATCH] Use a better workaround for Wayland crashes.
GoldenDict use lots of X11 functions and it currently cannot work natively on Wayland. This workaround will force GoldenDict to use XWayland.
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
---
main.cc | 11 +++++++++++
redist/goldendict.desktop | 5 -----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/main.cc b/main.cc
index b3f16ed7..f6a85c07 100644
--- a/main.cc
+++ b/main.cc
@@ -212,6 +212,17 @@ class LogFilePtrGuard
int main( int argc, char ** argv )
{
+#ifdef Q_OS_UNIX
+ // GoldenDict use lots of X11 functions and it currently cannot work
+ // natively on Wayland. This workaround will force GoldenDict to use
+ // XWayland.
+ char * xdg_envc = getenv("XDG_SESSION_TYPE");
+ QString xdg_session = xdg_envc ? QString::fromLatin1(xdg_envc) : QString();
+ if (!QString::compare(xdg_session, QString("wayland"), Qt::CaseInsensitive))
+ {
+ setenv("QT_QPA_PLATFORM", "xcb", 1);
+ }
+#endif
#ifdef Q_OS_MAC
setenv("LANG", "en_US.UTF-8", 1);
diff --git a/redist/goldendict.desktop b/redist/goldendict.desktop
index 13a5fe8f..9cb1d574 100755
--- a/redist/goldendict.desktop
+++ b/redist/goldendict.desktop
@@ -7,8 +7,3 @@ GenericName=Multiformat Dictionary
Comment=GoldenDict
Icon=goldendict
Exec=goldendict
-Actions=X11;
-
-[Desktop Action X11]
-Name=GoldenDict (X11)
-Exec=env QT_QPA_PLATFORM=xcb goldendict

@ -1,5 +1,5 @@
%global owner goldendict
%global commit a1c7c5b3762c292c2620af41428c3c6c3f758f04
%global commit 6ca112b797e70774d252b3635d41b4c5d38ea9dd
Name: goldendict
Version: 1.5
@ -9,9 +9,6 @@ License: GPLv3+
URL: http://goldendict.org
Source0: https://github.com/%{owner}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
# https://github.com/goldendict/goldendict/pull/1243
Patch100: %{name}-pr1243.patch
BuildRequires: cmake(Qt5LinguistTools)
BuildRequires: cmake(Qt5XmlPatterns)
BuildRequires: cmake(Qt5Multimedia)
@ -87,7 +84,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
%changelog
* Fri Mar 27 2020 Vitaly Zaitsev <vitaly@easycoding.org> - 1.5-0.27.RC2
- Use a better workaround for crashes on Wayland.
- Rebased to 6ca112b snapshot with Wayland crash fixes.
* Sun Mar 15 2020 Vitaly Zaitsev <vitaly@easycoding.org> - 1.5-0.26.RC2
- Rebased to a1c7c5b snapshot with a separate desktop action for Wayland.

@ -1 +1 @@
SHA512 (goldendict-a1c7c5b3762c292c2620af41428c3c6c3f758f04.tar.gz) = 2bfd394bb2c8f6788a377970a5bc6e13e5082e9ac9e1d4b1ce70af67fd95d78f00aa543bf3ac161916fd3ea2dc767cffe6ec1f4321662ba39028e44caa2520b9
SHA512 (goldendict-6ca112b797e70774d252b3635d41b4c5d38ea9dd.tar.gz) = 021c97d1e06b1faf162505d70ccea9a7b1edad6102b19765b30ccdce6985edfe9d1d3532640da69bd6c5dc0099322cb40bbc674c4ccf0da99ffb840a8fbe4c25

Loading…
Cancel
Save