1d8f0c55de
* libreoffice-mergedlibs-circular-deps.patch - Add patch for plasma5 UI selector support * libreoffice-4.3-plasma5-ui-decisions.patch - Version bump to 4.3.3: * Various upstream fixes included in maintenance branch * fixes bnc#900218 and bnc#900214 CVE-2014-3693 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=201
60 lines
2.0 KiB
Diff
60 lines
2.0 KiB
Diff
From e04b8afe7aef5db535311630834bc25316433dae Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tomas.chvatal@gmail.com>
|
|
Date: Mon, 3 Nov 2014 10:01:52 +0100
|
|
Subject: Detect KDE5 and fallback to KDE4UI there
|
|
|
|
Change-Id: I8da53d7b81d28b0051be96c0c4ee0a29d8ed8360
|
|
Reviewed-on: https://gerrit.libreoffice.org/12209
|
|
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
|
|
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
|
|
|
|
diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
|
|
index 163d48e..e1f253d 100644
|
|
--- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx
|
|
+++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
|
|
@@ -272,6 +272,23 @@ static bool is_kde4_desktop( Display* pDisplay )
|
|
return false;
|
|
}
|
|
|
|
+static bool is_kde5_desktop( Display* pDisplay )
|
|
+{
|
|
+ if ( NULL != getenv( "KDE_FULL_SESSION" ) )
|
|
+ {
|
|
+ OUString aVer( "5" );
|
|
+
|
|
+ const char *pVer = getenv( "KDE_SESSION_VERSION" );
|
|
+ if ( pVer && aVer.equalsIgnoreAsciiCaseAscii( pVer ) )
|
|
+ return true;
|
|
+ }
|
|
+
|
|
+ if ( KDEVersion( pDisplay ) == 5 )
|
|
+ return true;
|
|
+
|
|
+ return false;
|
|
+}
|
|
+
|
|
extern "C"
|
|
{
|
|
|
|
@@ -285,6 +302,8 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
|
|
|
|
if ( aOver.equalsIgnoreAsciiCase( "tde" ) )
|
|
return DESKTOP_TDE;
|
|
+ if ( aOver.equalsIgnoreAsciiCase( "kde5" ) )
|
|
+ return DESKTOP_KDE4;
|
|
if ( aOver.equalsIgnoreAsciiCase( "kde4" ) )
|
|
return DESKTOP_KDE4;
|
|
if ( aOver.equalsIgnoreAsciiCase( "gnome" ) )
|
|
@@ -371,6 +390,8 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
|
|
|
|
// these guys can be slower, with X property fetches,
|
|
// round-trips etc. and so are done later.
|
|
+ else if ( is_kde5_desktop( pDisplay ) )
|
|
+ ret = DESKTOP_KDE4;
|
|
else if ( is_kde4_desktop( pDisplay ) )
|
|
ret = DESKTOP_KDE4;
|
|
else if ( is_gnome_desktop( pDisplay ) )
|
|
--
|
|
cgit v0.10.2
|
|
|