summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2019-05-30 11:29:18 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2019-05-31 08:31:54 +0200
commit1124e98e935cec42c51f25f1fc713285b1044d07 (patch)
treecc33761fff0d27589d94c9229d4a63598fc60915 /vcl
parent42d27ed5c07f829dab1d5b663fc14cf1b61061b4 (diff)
Revert "tdf#123011 Detect kde5 desktop in Plasma Wayland session"
kde5 plugin on Wayland still shows too many issues, like e.g. tdf#123654 and was barely tested, so don't use it by default in libreoffice-6-2 branch, but prefer gtk3. This does not affect the X11 case. This reverts commit 3e4478103ee1ba912d650ab447ed246f5f1cc196. Change-Id: I7f74a6b5f377f65b81cf5ae189e8672bdce82c95 Reviewed-on: https://gerrit.libreoffice.org/73193 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/generic/desktopdetect/desktopdetector.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
index 9f65b1624181..e7cb9b93e801 100644
--- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx
+++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
@@ -191,13 +191,16 @@ static bool is_kde4_desktop( Display* pDisplay )
return false;
}
-static bool is_kde5_desktop()
+static bool is_kde5_desktop( Display* pDisplay )
{
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;
}
@@ -277,9 +280,6 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
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,7 +328,9 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
XErrorHandler pOldHdl = XSetErrorHandler( autodect_error_handler );
- if ( is_kde4_desktop( pDisplay ) )
+ if ( is_kde5_desktop( pDisplay ) )
+ ret = DESKTOP_KDE5;
+ else if ( is_kde4_desktop( pDisplay ) )
ret = DESKTOP_KDE4;
else if ( is_gnome_desktop( pDisplay ) )
ret = DESKTOP_GNOME;