[Libreoffice-commits] core.git: vcl/unx

Stephan Bergmann sbergman at redhat.com
Wed Dec 10 06:44:07 PST 2014


 vcl/unx/generic/desktopdetect/desktopdetector.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 011c2950de31126d424236dbea55aab79e8272ef
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Dec 10 15:35:44 2014 +0100

    No need to re-check IsHeadlessModeRequested in get_desktop_environment
    
    It is already checked on all call chains:
    
    * CreateSalInstance (vcl/unx/generic/plugadapt/salplug.cxx) checks
      IsHeadlessModeRequested before calling autodetect_plugin ->
      get_desktop_environment -> get_desktop_environment
    
    * Application::GetDesktopEnvironment (vcl/source/app/svapp.cxx) checks
      IsHeadlessModeEnabled before potentially calling SalGetDesktopEnvironment
      (vcl/unx/generic/plugadapt/salplug.cxx) -> get_desktop_environment
      -> get_desktop_environment
    
    * The two calls to SalGetDesktopEnvironment in vcl/unx/gtk/ are clearly only done
      for GTK plugins, not headless
    
    Change-Id: I44b43cecd63effc5b2e3ad2a449943fee183462a

diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
index 067e729..386925e 100644
--- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx
+++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
@@ -28,7 +28,6 @@
 #include "rtl/ustrbuf.hxx"
 #include "osl/module.h"
 #include "osl/thread.h"
-#include "vcl/svapp.hxx"
 
 #include "vclpluginapi.h"
 
@@ -326,7 +325,7 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
     OUString plugin;
     rtl::Bootstrap::get("SAL_USE_VCLPLUGIN", plugin);
 
-    if (plugin == "svp" || Application::IsHeadlessModeRequested())
+    if (plugin == "svp")
         pDisplayStr = NULL;
     else
     {


More information about the Libreoffice-commits mailing list