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

New commits:
commit e9285d3c89593d98b8e6e328f4c578a8db4a6591
Author:     Patrick Luby <guibmac...@gmail.com>
AuthorDate: Sat Mar 8 19:57:08 2025 -0500
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Sun Mar 9 04:39:59 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>
    (cherry picked from commit 9e3d8d0176bb1e95414e4a578065c2e1035a8dd6)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182684
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index cb4a4de7db9e..3dfce24bc118 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1594,7 +1594,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