diff options
authorThorsten Behrens <>2017-07-18 18:51:50 +0200
committerThorsten Behrens <>2017-07-18 23:38:47 +0200
commit8180b6801dca2052a9d40411f9bbdcc96198c52f (patch)
parenteff84b958c54985e0b81c44b2cd81722abeb9320 (diff)
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: Tested-by: Jenkins <> Reviewed-by: Thorsten Behrens <>
1 files changed, 8 insertions, 0 deletions
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>
+#include <stdlib.h>
#ifdef ANDROID
@@ -362,6 +364,12 @@ bool InitVCL()
+#ifndef _WIN32
+ // Clear startup notification details for child processes
+ // See for discussion
+ unsetenv("DESKTOP_STARTUP_ID");
return true;