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

git pushed a commit to reference refs/pull/35/head
in repository terminology.

View the commit online.

commit 0405a82f7a4fbac511ad78637a16e0f9beffa077
Author: Cedric BAIL <[email protected]>
AuthorDate: Mon Mar 23 12:18:29 2026 -0600

    main: set window position before show to respect EFL mouse-screen centering
    
    EFL's Cocoa backend now centers windows on the display containing the
    mouse pointer when no explicit position is requested. For this to work
    correctly with the -g geometry option, the position must be applied
    before evas_object_show so that request_pos is set and EFL skips its
    automatic centering.
    
    Move the instance->pos block in _start() before the show call, matching
    what main_ipc_new() already does.
    
    Made-with: Cursor
---
 src/bin/main.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/bin/main.c b/src/bin/main.c
index 5384e26c..255c5712 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -185,7 +185,6 @@ main_config_get(void)
    return _main_config;
 }
 
-
 static void
 main_ipc_new(Ipc_Instance *inst)
 {
@@ -624,6 +623,15 @@ _start(Ipc_Instance *instance, Eina_Bool need_scale_wizard)
    main_media_update(config);
    win_sizing_handle(wn);
    win = win_evas_object_get(wn);
+   if (instance->pos)
+     {
+        int screen_w, screen_h;
+
+        elm_win_screen_size_get(win, NULL, NULL, &screen_w, &screen_h);
+        if (instance->x < 0) instance->x = screen_w + instance->x;
+        if (instance->y < 0) instance->y = screen_h + instance->y;
+        evas_object_move(win, instance->x, instance->y);
+     }
    evas_object_show(win);
    if (instance->startup_split)
      {
@@ -658,15 +666,6 @@ _start(Ipc_Instance *instance, Eina_Bool need_scale_wizard)
                }
           }
      }
-   if (instance->pos)
-     {
-        int screen_w, screen_h;
-
-        elm_win_screen_size_get(win, NULL, NULL, &screen_w, &screen_h);
-        if (instance->x < 0) instance->x = screen_w + instance->x;
-        if (instance->y < 0) instance->y = screen_h + instance->y;
-        evas_object_move(win, instance->x, instance->y);
-     }
    if (instance->nowm)
       ecore_evas_focus_set(ecore_evas_ecore_evas_get(
             evas_object_evas_get(win)), 1);

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

Reply via email to