[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx

Michael Weghorn (via logerrit) logerrit at kemper.freedesktop.org
Fri May 31 06:32:28 UTC 2019


 vcl/unx/generic/desktopdetect/desktopdetector.cxx |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 1124e98e935cec42c51f25f1fc713285b1044d07
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Thu May 30 11:29:18 2019 +0200
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Fri May 31 08:31:54 2019 +0200

    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 at fbihome.de>
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>

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;


More information about the Libreoffice-commits mailing list