- Add patch to fix detection of KDE session on wayland:

* kde5-detection.patch

OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=751
This commit is contained in:
Tomáš Chvátal 2019-01-29 08:32:14 +00:00 committed by Git OBS Bridge
parent 04715a03a5
commit c663c04178
3 changed files with 62 additions and 0 deletions

58
kde5-detection.patch Normal file
View File

@ -0,0 +1,58 @@
From 998d18077615b28bca7b411528c8a1c11665e173 Mon Sep 17 00:00:00 2001
From: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue, 29 Jan 2019 08:18:15 +0100
Subject: [PATCH] tdf#123011 Detect kde5 desktop in Plasma Wayland session
Both env variables 'KDE_FULL_SESSION' and 'KDE_SESSION_VERSION'
are set in both X11 and Wayland sessions for Plasma 5 (kde5),
s.a. https://userbase.kde.org/KDE_System_Administration/Environment_Variables,
so drop the alternative X-specific check.
Move the check for a kde5 upward, so that kde5 is actually detected
in a Plasma 5 Wayland session, rather than falling back to
assuming GNOME.
Change-Id: Ieb5b47272f375ceed4d44a2ccc5b517222ae86b9
---
diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
index e7cb9b9..9f65b16 100644
--- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx
+++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
@@ -191,14 +191,11 @@
return false;
}
-static bool is_kde5_desktop( Display* pDisplay )
+static bool is_kde5_desktop()
{
static const char * pFullVersion = getenv( "KDE_FULL_SESSION" );
static const char * pSessionVersion = getenv( "KDE_SESSION_VERSION" );
if ( pFullVersion && pSessionVersion && strcmp(pSessionVersion, "5") == 0)
- return true;
-
- if ( KDEVersion( pDisplay ) == 5 )
return true;
return false;
@@ -280,6 +277,9 @@
ret = DESKTOP_LXQT;
else
{
+ if ( is_kde5_desktop() )
+ return DESKTOP_KDE5;
+
// tdf#121275 if we still can't tell, and WAYLAND_DISPLAY
// is set, default to gtk3
const char* pWaylandStr = getenv("WAYLAND_DISPLAY");
@@ -328,9 +328,7 @@
XErrorHandler pOldHdl = XSetErrorHandler( autodect_error_handler );
- if ( is_kde5_desktop( pDisplay ) )
- ret = DESKTOP_KDE5;
- else if ( is_kde4_desktop( pDisplay ) )
+ if ( is_kde4_desktop( pDisplay ) )
ret = DESKTOP_KDE4;
else if ( is_gnome_desktop( pDisplay ) )
ret = DESKTOP_GNOME;

View File

@ -3,6 +3,8 @@ Fri Jan 25 09:12:12 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Switch to full KDE stack for KDE Frameworks integration instead - Switch to full KDE stack for KDE Frameworks integration instead
of gtk3 KDE wrapper bsc#1123131 of gtk3 KDE wrapper bsc#1123131
- Add patch to fix detection of KDE session on wayland:
* kde5-detection.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jan 24 13:19:29 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com> Thu Jan 24 13:19:29 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

@ -101,6 +101,7 @@ Patch2: nlpsolver-no-broken-help.diff
Patch3: mediawiki-no-broken-help.diff Patch3: mediawiki-no-broken-help.diff
Patch4: java112.patch Patch4: java112.patch
Patch5: old-boost.patch Patch5: old-boost.patch
Patch6: kde5-detection.patch
# try to save space by using hardlinks # try to save space by using hardlinks
Patch990: install-with-hardlinks.diff Patch990: install-with-hardlinks.diff
BuildRequires: %{name}-share-linker BuildRequires: %{name}-share-linker
@ -962,6 +963,7 @@ Provides %{langname} translations and additional resources (help files, etc.) fo
%patch2 %patch2
%patch3 %patch3
%patch4 -p1 %patch4 -p1
%patch6 -p1
%patch990 -p1 %patch990 -p1
# Disable some of the failing tests (some are random) # Disable some of the failing tests (some are random)