This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 2e8c4aece3 Run the Extension Manager update dialog on the main thread
2e8c4aece3 is described below

commit 2e8c4aece387e941bc3664b9e05d85fb1bb3fd82
Author: Jim Jagielski <[email protected]>
AuthorDate: Fri Aug 7 16:08:47 2026 -0400

    Run the Extension Manager update dialog on the main thread
    
    Dialog::Execute() was called from the deployment worker thread, where
    AquaSalInstance::Yield cannot pump the Cocoa event queue, so on macOS
    "Check for Updates" left the dialog unstable.
---
 .../source/deployment/gui/dp_gui_extensioncmdqueue.cxx  | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/main/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx 
b/main/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index 68e84216fb..5b9137c1ec 100644
--- a/main/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/main/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -72,6 +72,7 @@
 #include "cppuhelper/implbase3.hxx"
 #include "comphelper/anytostring.hxx"
 #include "vcl/msgbox.hxx"
+#include "vcl/threadex.hxx"
 #include "toolkit/helper/vclunohelper.hxx"
 #include "comphelper/processfactory.hxx"
 
@@ -90,6 +91,7 @@
 #include <dp_gui_handleversionexception.hxx>
 
 #include <queue>
+#include <boost/bind.hpp>
 #include <boost/shared_ptr.hpp>
 
 #if (defined(_MSC_VER) && (_MSC_VER < 1400))
@@ -253,6 +255,7 @@ private:
     void _disableExtension( ::rtl::Reference< ProgressCmdEnv > &rCmdEnv,
                             const uno::Reference< deployment::XPackage > 
&xPackage );
     void _checkForUpdates( const 
std::vector<uno::Reference<deployment::XPackage > > &vExtensionList );
+    void _solar_checkForUpdates( const 
std::vector<uno::Reference<deployment::XPackage > > &vExtensionList );
     void _acceptLicense( ::rtl::Reference< ProgressCmdEnv > &rCmdEnv,
                            const uno::Reference< deployment::XPackage > 
&xPackage );
 
@@ -937,12 +940,22 @@ void ExtensionCmdQueue::Thread::_removeExtension( 
::rtl::Reference< ProgressCmdE
 
//------------------------------------------------------------------------------
 void ExtensionCmdQueue::Thread::_checkForUpdates(
     const std::vector<uno::Reference<deployment::XPackage > > &vExtensionList )
+{
+    // Dialog::Execute() must run on the main thread; on Mac OS X only that 
thread
+    // pumps the Cocoa event queue (AquaSalInstance::Yield), so executing the
+    // update dialog on this worker thread would leave it visible but frozen.
+    vcl::solarthread::syncExecute(
+        boost::bind( &ExtensionCmdQueue::Thread::_solar_checkForUpdates,
+                     this, vExtensionList ) );
+}
+
+//------------------------------------------------------------------------------
+void ExtensionCmdQueue::Thread::_solar_checkForUpdates(
+    const std::vector<uno::Reference<deployment::XPackage > > &vExtensionList )
 {
     UpdateDialog* pUpdateDialog;
     std::vector< UpdateData > vData;
 
-    const ::vos::OGuard guard( Application::GetSolarMutex() );
-
     pUpdateDialog = new UpdateDialog( m_xContext, m_pDialogHelper? 
m_pDialogHelper->getWindow() : NULL, vExtensionList, &vData );
 
     pUpdateDialog->notifyMenubar( true, false ); // prepare the checking, if 
there updates to be notified via menu bar icon

Reply via email to