summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2017-07-18 18:51:50 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2017-07-19 10:52:08 +0200
commitb5002591fb6f99c4ca60c0529220442ef790fd2d (patch)
treef45b4567a97d96ee2e3f5622cbd40a53e8d4c37d /vcl
parentb15de6b1e670b277b31f7fb579fc42a8ae5efbee (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: https://gerrit.libreoffice.org/40153 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 8180b6801dca2052a9d40411f9bbdcc96198c52f) Reviewed-on: https://gerrit.libreoffice.org/40164 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/svmain.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 2a89d80f60f3..2d7950a8aa11 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
@@ -346,6 +348,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;
}