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

git pushed a commit to branch reproducible-widget-previews
in repository efl.

View the commit online.

commit ad29bf261f3cd5769a5a2db804692f0b2364dff1
Author: Cedric BAIL <[email protected]>
AuthorDate: Tue Mar 17 17:50:14 2026 -0600

    ecore_cocoa: activate app on window show and add backing scale API
    
    Ensure the application is activated when a window is first shown, so
    it comes to the foreground and receives focus.
    
    Also add ecore_cocoa_window_backing_scale_get() for future HiDPI
    support, returning the NSWindow backingScaleFactor.
    
    Made-with: Cursor
---
 src/lib/ecore_cocoa/Ecore_Cocoa.h        |  7 +++++++
 src/lib/ecore_cocoa/ecore_cocoa_window.m | 12 +++++++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_cocoa/Ecore_Cocoa.h b/src/lib/ecore_cocoa/Ecore_Cocoa.h
index a545d584d7..396ac7e8df 100644
--- a/src/lib/ecore_cocoa/Ecore_Cocoa.h
+++ b/src/lib/ecore_cocoa/Ecore_Cocoa.h
@@ -522,6 +522,13 @@ EAPI void ecore_cocoa_window_cursor_set(Ecore_Cocoa_Window *win,
 EAPI void ecore_cocoa_window_cursor_show(Ecore_Cocoa_Window *win, Eina_Bool show);
    EINA_ARG_NONNULL(1);
 
+/**
+ * Gets the backing scale factor for HiDPI/Retina displays
+ * @param window The Cocoa window to query
+ * @return The scale factor (e.g. 2.0 on Retina displays, 1.0 otherwise)
+ */
+EAPI double ecore_cocoa_window_backing_scale_get(const Ecore_Cocoa_Window *window);
+
 /**
  * Overrides the default behaviour in response to an application delete
  * request. When an application receives a delete request (i.e. CMD+Q)
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_window.m b/src/lib/ecore_cocoa/ecore_cocoa_window.m
index ebd3ddd498..8dda3f098c 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_window.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_window.m
@@ -538,7 +538,10 @@ ecore_cocoa_window_show(Ecore_Cocoa_Window *window)
    EINA_SAFETY_ON_NULL_RETURN(window);
 
    if (![window->window isVisible])
-     [window->window makeKeyAndOrderFront:NSApp];
+     {
+        [window->window makeKeyAndOrderFront:NSApp];
+        [NSApp activateIgnoringOtherApps:YES];
+     }
    [window->window display];
 }
 
@@ -655,6 +658,13 @@ ecore_cocoa_window_cursor_show(Ecore_Cocoa_Window *win,
    else [NSCursor hide];
 }
 
+EAPI double
+ecore_cocoa_window_backing_scale_get(const Ecore_Cocoa_Window *window)
+{
+   if (!window || !window->window) return 1.0;
+   return [window->window backingScaleFactor];
+}
+
 Eina_Bool
 _ecore_cocoa_window_init(void)
 {

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

Reply via email to