discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=eb2dfda7bb3e058acc118e5fbc4f1b01ce36905f
commit eb2dfda7bb3e058acc118e5fbc4f1b01ce36905f Author: Mike Blumenkrantz <zm...@osg.samsung.com> Date: Thu Jan 22 22:35:28 2015 -0500 win centering: unbork! not centering on an axis does not mean that it needs to be moved to the screen origin. also clamp to screen x,y, not 0,0 --- src/lib/elm_win.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index 233e17b..53bbe8a 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -3797,15 +3797,13 @@ _elm_win_center(Eo *obj, Elm_Win_Data *sd, Eina_Bool h, Eina_Bool v) ecore_evas_screen_geometry_get(sd->ee, NULL, NULL, &screen_w, &screen_h); if ((!screen_w) || (!screen_h)) return; - evas_object_geometry_get(obj, NULL, NULL, &win_w, &win_h); + evas_object_geometry_get(obj, &nx, &ny, &win_w, &win_h); if ((!win_w) || (!win_h)) return; if (h) nx = win_w >= screen_w ? 0 : (screen_w / 2) - (win_w / 2); - else nx = sd->screen.x; if (v) ny = win_h >= screen_h ? 0 : (screen_h / 2) - (win_h / 2); - else ny = sd->screen.y; - if (nx < 0) nx = 0; - if (ny < 0) ny = 0; + if (nx < sd->screen.x) nx = sd->screen.x; + if (ny < sd->screen.y) ny = sd->screen.y; evas_object_move(obj, nx, ny); } --