This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch fix-modern-macos
in repository efl.

View the commit online.

commit 3c382221db765dbd6ea49f9e98c2be9b421f3299
Author: Cedric BAIL <[email protected]>
AuthorDate: Wed Jun 17 09:27:33 2026 -0600

    fix(ecore_cocoa): correct dock-click/Spotlight reopen behavior
    
    Fix three bugs in applicationShouldHandleReopen:
    
    - Invert the YES/NO return mapping so the callback's
      EINA_TRUE (handled) correctly maps to Cocoa NO
      (suppress AppKit defaults), and vice versa.
    - Return YES by default when no callback is registered,
      allowing AppKit's standard window-raising behavior.
    - Respect hasVisibleWindows in the Elementary reopen
      handler: only create a new window when none exist;
      otherwise delegate to AppKit for raising existing windows.
    
    Signed-off-by: Cedric BAIL <[email protected]>
---
 src/lib/ecore_cocoa/ecore_cocoa_app.m | 6 ++++--
 src/lib/elementary/elm_cocoa_menu.c   | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/lib/ecore_cocoa/ecore_cocoa_app.m b/src/lib/ecore_cocoa/ecore_cocoa_app.m
index f928347a23..de851a3ab2 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_app.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_app.m
@@ -211,9 +211,11 @@ static Ecore_Cocoa_AppDelegate *_appDelegate = nil;
    if (cb)
      {
         Eina_Bool handled = cb(flag ? EINA_TRUE : EINA_FALSE);
-        return handled ? YES : NO;
+        /* Cocoa YES = "AppKit apply defaults"; NO = "I handled it, don't". */
+        return handled ? NO : YES;
      }
-   return NO;
+   /* No callback registered: let AppKit apply its standard reopen behavior. */
+   return YES;
 }
 
 - (void)application:(NSApplication *)sender openURLs:(NSArray<NSURL *> *)urls
diff --git a/src/lib/elementary/elm_cocoa_menu.c b/src/lib/elementary/elm_cocoa_menu.c
index 8556633b40..03aa81cdaa 100644
--- a/src/lib/elementary/elm_cocoa_menu.c
+++ b/src/lib/elementary/elm_cocoa_menu.c
@@ -517,9 +517,11 @@ _elm_app_new_window_cb_changed(Eina_Bool now_set)
 }
 
 static Eina_Bool
-_elm_cocoa_reopen_handler(Eina_Bool has_visible EINA_UNUSED)
+_elm_cocoa_reopen_handler(Eina_Bool has_visible)
 {
-   return elm_app_new_window_request();
+   if (!has_visible)
+     return elm_app_new_window_request();
+   return EINA_FALSE;
 }
 
 void

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to