parent
6b88221133
commit
e121686589
@ -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 +1 @@
|
|||||||
SHA512 (goldendict-a1c7c5b3762c292c2620af41428c3c6c3f758f04.tar.gz) = 2bfd394bb2c8f6788a377970a5bc6e13e5082e9ac9e1d4b1ce70af67fd95d78f00aa543bf3ac161916fd3ea2dc767cffe6ec1f4321662ba39028e44caa2520b9
|
SHA512 (goldendict-6ca112b797e70774d252b3635d41b4c5d38ea9dd.tar.gz) = 021c97d1e06b1faf162505d70ccea9a7b1edad6102b19765b30ccdce6985edfe9d1d3532640da69bd6c5dc0099322cb40bbc674c4ccf0da99ffb840a8fbe4c25
|
||||||
|
Loading…
Reference in new issue