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

Thorsten Behrens Thorsten.Behrens at CIB.de
Tue Jul 18 21:39:23 UTC 2017


 vcl/source/app/svmain.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 8180b6801dca2052a9d40411f9bbdcc96198c52f
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date:   Tue Jul 18 18:51:50 2017 +0200

    tdf#109194 cleanse startup notification foo from env
    
    So when the desktop environment does startup notification, this
    DESKTOP_STARTUP_ID gets passed on to the launched application.
    Problem is, XDG spec says app should read it from the env, then
    discard - which LibreOffice never does.
    
    When passed on to child processes, funny effects might ensue, so
    let's just erase this at the end of VCL init, when I'm reasonably
    sure every gtk/kde/whatnot backend did read it.
    
    Change-Id: I1f758c7a02455028d2b520c144ffe32538621f19
    Reviewed-on: https://gerrit.libreoffice.org/40153
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 2264c8424ebf..325eef803b9a 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -57,6 +57,8 @@
 #include <svsys.h>
 #include <process.h>
 #include <ole2.h>
+#else
+#include <stdlib.h>
 #endif
 
 #ifdef ANDROID
@@ -362,6 +364,12 @@ bool InitVCL()
     DebugEventInjector::getCreate();
 #endif
 
+#ifndef _WIN32
+    // Clear startup notification details for child processes
+    // See https://bugs.freedesktop.org/show_bug.cgi?id=11375 for discussion
+    unsetenv("DESKTOP_STARTUP_ID");
+#endif
+
     return true;
 }
 


More information about the Libreoffice-commits mailing list