desktop/source/app/app.cxx |   19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 9e3d8d0176bb1e95414e4a578065c2e1035a8dd6
Author:     Patrick Luby <guibmac...@gmail.com>
AuthorDate: Sat Mar 8 19:57:08 2025 -0500
Commit:     Patrick Luby <guibomac...@gmail.com>
CommitDate: Sun Mar 9 03:16:42 2025 +0100

    Related: tdf#41775 show Start Center even if loading a document
    
    If LibreOffice is launched by opening a document from the
    Finder, dragging it to the Dock, or including it in the
    command line arguments, the Start Center doesn't get created
    when all of the document windows are closed. So, the old
    "File only" menubar is displayed.
    
    On macOS, the Start Center's menubar is the "no windows open"
    menubar. This is done by making a native copy of the Start
    Center's menubar each time it is opened (note: on macOS the
    Start Center window can be closed and reopened repeatedly)
    so pre-populate the "no windows open" menubar by opening the
    Start Center even if a document is going to be loaded.
    
    Change-Id: Ia3353748ca0517bb5f090f0b09641c93cf22c260
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182682
    Tested-by: Jenkins
    Reviewed-by: Patrick Luby <guibomac...@gmail.com>

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index a89467ca9860..e23646736a6a 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1595,7 +1595,24 @@ int Desktop::Main()
     pExecGlobals->bRestartRequested = 
xRestartManager->isRestartRequested(true);
     if ( !pExecGlobals->bRestartRequested )
     {
-        if ((!rCmdLineArgs.WantsToLoadDocument() && 
!rCmdLineArgs.IsInvisible() && !rCmdLineArgs.IsHeadless() && 
!rCmdLineArgs.IsQuickstart()) &&
+#ifdef MACOSX
+        // Related: tdf#41775 show Start Center even if loading a document
+        // If LibreOffice is launched by opening a document from the
+        // Finder, dragging it to the Dock, or including it in the
+        // command line arguments, the Start Center doesn't get created
+        // when all of the document windows are closed. So, the old
+        // "File only" menubar is displayed.
+        // On macOS, the Start Center's menubar is the "no windows open"
+        // menubar. This is done by making a native copy of the Start
+        // Center's menubar each time it is opened (note: on macOS the
+        // Start Center window can be closed and reopened repeatedly)
+        // so pre-populate the "no windows open" menubar by opening the
+        // Start Center even if a document is going to be loaded.
+        if ((/* !rCmdLineArgs.WantsToLoadDocument() && */
+#else
+        if ((!rCmdLineArgs.WantsToLoadDocument() &&
+#endif
+            !rCmdLineArgs.IsInvisible() && !rCmdLineArgs.IsHeadless() && 
!rCmdLineArgs.IsQuickstart()) &&
             
(SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::STARTMODULE)) 
&&
             (!bExistsRecoveryData                                              
    ) &&
             (!bExistsSessionData                                               
    ) &&

Reply via email to