From 8180b6801dca2052a9d40411f9bbdcc96198c52f Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Tue, 18 Jul 2017 18:51:50 +0200 Subject: 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 Reviewed-by: Thorsten Behrens --- vcl/source/app/svmain.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) 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 #include #include +#else +#include #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; } -- cgit v1.2.3