From 493f6f595b525747852fcec36abf0aa613963683 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 8 Feb 2016 13:38:19 -0500 Subject: [PATCH] Revert "e - restart window positioning - fix it" This reverts commit d0229b3652872b0324ec4671e7469d9a9904186b. see following patches --- src/bin/e.h | 1 - src/bin/e_client.c | 15 ++++----------- src/bin/e_comp_object.c | 11 ++--------- src/bin/e_main.c | 2 -- 4 files changed, 6 insertions(+), 23 deletions(-) diff --git a/src/bin/e.h b/src/bin/e.h index f181b0722..6b7ea51c8 100644 --- a/src/bin/e.h +++ b/src/bin/e.h @@ -313,7 +313,6 @@ extern E_API Eina_Bool starting; extern E_API Eina_Bool stopping; extern E_API Eina_Bool restart; extern E_API Eina_Bool e_nopause; -extern E_API double e_main_loop_started; extern E_API Eina_Bool e_precache_end; extern E_API Eina_Bool x_fatal; diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 380791086..c0678b93e 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -1876,17 +1876,10 @@ _e_client_eval(E_Client *ec) } else if (!E_INSIDE(ec->x, ec->y, zx, zy, zw, zh)) { -// FIXME: this causes initial positioning of windows to be broken on restart - if (!((ecore_time_get() - e_main_loop_started) < 5.0)) - // if during the startup phase and inital event burst - // big nasty hack - assume 5 seconds ... then DONT do this - // because otherwise windows just shuffle into the center - { - /* 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; - } + /* 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 */ diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index fb3197c62..06b694318 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -3286,15 +3286,8 @@ reshadow: _e_comp_smart_cb_frame_recalc(cw, cw->smart_obj, NULL); if ((cw->x == -1) && (cw->y == -1) && cw->ec->new_client && (!cw->ec->placed)) { -// FIXME: this causes windows to move up by a titlebar height each restart - if (!((ecore_time_get() - e_main_loop_started) < 5.0)) - // if during the startup phase and inital event burst - // big nasty hack - assume 5 seconds ... then DONT do this - // because every restart otherwise windows just shift up and up - { - cw->ec->x = MAX(cw->ec->zone->x, cw->ec->client.x - cw->client_inset.l); - cw->ec->y = MAX(cw->ec->zone->y, cw->ec->client.y - cw->client_inset.t); - } + cw->ec->x = MAX(cw->ec->zone->x, cw->ec->client.x - cw->client_inset.l); + cw->ec->y = MAX(cw->ec->zone->y, cw->ec->client.y - cw->client_inset.t); } /* this guarantees that we won't get blocked by the NOP check in the interceptor */ cw->y = cw->x = -99999; diff --git a/src/bin/e_main.c b/src/bin/e_main.c index e1a80c8b7..772e119e3 100644 --- a/src/bin/e_main.c +++ b/src/bin/e_main.c @@ -111,7 +111,6 @@ E_API Eina_Bool starting = EINA_TRUE; E_API Eina_Bool stopping = EINA_FALSE; E_API Eina_Bool restart = EINA_FALSE; E_API Eina_Bool e_nopause = EINA_FALSE; -E_API double e_main_loop_started = 0.0; EINTERN const char *e_first_frame = NULL; EINTERN double e_first_frame_start_time = -1; @@ -1059,7 +1058,6 @@ main(int argc, char **argv) e_util_env_set("E_RESTART", "1"); TS("MAIN LOOP AT LAST"); - e_main_loop_started = ecore_time_get(); if (!setjmp(x_fatal_buff)) ecore_main_loop_begin(); else