discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=1469e9b9738df3b5f090db6c7cdec40e1bc1c09b
commit 1469e9b9738df3b5f090db6c7cdec40e1bc1c09b Author: Toan Pham <reset.poin...@gmail.com> Date: Tue Jun 16 14:28:32 2015 -0400 Center a dialog window when it is displaying off-screen Summary: Center a newly created dialog window when it is displaying off-screen. Fixes T2419 Reviewers: zmike Subscribers: cedric Maniphest Tasks: T2419 Differential Revision: https://phab.enlightenment.org/D2646 --- src/bin/e_client.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index e600e39..7545263 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -1866,6 +1866,13 @@ _e_client_eval(E_Client *ec) ec->placed = 1; ec->pre_cb.x = ec->x; ec->pre_cb.y = ec->y; } + else if (!E_INSIDE(ec->x, ec->y, zx, zy, zw, zh)) + { + /* If an ec is placed out of bound, fix it! */ + ec->x = zx + ((zw - ec->w) / 2); + ec->y = zy + ((zh - ec->h) / 2); + ec->changes.pos = 1; + } /* Recreate state */ if (!ec->override) --