From a610ba3af2098b94e92de1dddbe76b225366897d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Nov 26 2010 10:26:27 +0000 Subject: Resolves: rhbz#652695 release desktop in timeout --- diff --git a/0001-destroydesktop.in.timeout.patch b/0001-destroydesktop.in.timeout.patch new file mode 100644 index 0000000..7ae1a77 --- /dev/null +++ b/0001-destroydesktop.in.timeout.patch @@ -0,0 +1,51 @@ +@@ -, +, @@ + fix crash in exiting via disabling lone quick-starter, terminate at idle +--- a/sfx2/source/appl/shutdownicon.cxx ++++ a/sfx2/source/appl/shutdownicon.cxx +@@ -182,6 +182,9 @@ bool ShutdownIcon::LoadModule( osl::Module **pModule, + return true; + } + ++// These two timeouts are necessary to avoid there being ++// plugin frames still on the stack, after unloading that ++// code, causing a crash during disabling / termination. + class IdleUnloader : Timer + { + ::osl::Module *m_pModule; +@@ -199,6 +202,22 @@ public: + } + }; + ++class IdleTerminate : Timer ++{ ++ Reference< XDesktop > m_xDesktop; ++public: ++ IdleTerminate (Reference< XDesktop > xDesktop) ++ { ++ m_xDesktop = xDesktop; ++ Start(); ++ } ++ virtual void Timeout() ++ { ++ m_xDesktop->terminate(); ++ delete this; ++ } ++}; ++ + void ShutdownIcon::initSystray() + { + if (m_bInitialized) +@@ -576,11 +595,8 @@ void ShutdownIcon::terminateDesktop() + if ( xSupplier.is() ) + { + Reference< XIndexAccess > xTasks ( xSupplier->getFrames(), UNO_QUERY ); +- if( xTasks.is() ) +- { +- if( xTasks->getCount() < 1 ) +- xDesktop->terminate(); +- } ++ if( xTasks.is() && xTasks->getCount() < 1 ) ++ new IdleTerminate( xDesktop ); + } + + // remove the instance pointer diff --git a/libreoffice.spec b/libreoffice.spec index 5b02908..58c9a64 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -96,6 +96,7 @@ Patch12: turn-script-providers-into-extensions.patch Patch13: qstart.dont-forceenabled-on-post-reg-restart.patch Patch14: libreoffice-installfix.patch Patch15: exit.quickstarter.when.deleted.patch +Patch16: 0001-destroydesktop.in.timeout.patch %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %define instdir %{_libdir} @@ -708,6 +709,7 @@ cp -p %{SOURCE20} external/unowinreg/unowinreg.dll %patch13 -p1 -b .qstart.dont-forceenabled-on-post-reg-restart.patch %patch14 -p1 -b .libreoffice-installfix.patch %patch15 -p1 -b .exit.quickstarter.when.deleted.patch +%patch16 -p1 -b .0001-destroydesktop.in.timeout.patch touch scripting/source/pyprov/delzip touch scripting/util/provider/beanshell/delzip touch scripting/util/provider/javascript/delzip @@ -2012,8 +2014,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %changelog -* Thu Nov 25 2010 Caolán McNamara 3.2.99.3-2 +* Fri Nov 26 2010 Caolán McNamara 3.2.99.3-2 - Resolves: rhbz#610103 exit quickstarter when libs deleted +- Resolves: rhbz#652695 release desktop in timeout * Thu Nov 18 2010 Caolán McNamara