diff options
author | Mike Blumenkrantz <zmike@osg.samsung.com> | 2016-03-18 13:47:25 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2016-03-18 13:53:28 -0400 |
commit | 7ce5f68b51ad9f4fe3cc20ae2acbd46334fe227e (patch) | |
tree | e93340fad52ed6db7f83d9dad304294c086fb073 | |
parent | 1c3b45e9843f1a405225658c2ecfd694a00851d0 (diff) | |
download | enlightenment-7ce5f68b51ad9f4fe3cc20ae2acbd46334fe227e.tar.gz |
store (internal) elm win geometry when set prior to showing the win
this fixes the case where attempts to manipulate a window would fail
prior to showing the window
-rw-r--r-- | src/bin/e_win.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bin/e_win.c b/src/bin/e_win.c index 018a887520..2e0ba14121 100644 --- a/src/bin/e_win.c +++ b/src/bin/e_win.c @@ -7,8 +7,10 @@ typedef struct _Elm_Win_Trap_Ctx { E_Client *client; E_Pointer *pointer; + int x, y, w, h; Eina_Bool centered : 1; Eina_Bool placed : 1; + Eina_Bool sized : 1; Eina_Bool internal_no_remember : 1; Eina_Bool internal_no_reopen : 1; Eina_Bool visible : 1; @@ -154,6 +156,8 @@ _e_elm_win_trap_show(void *data, Evas_Object *o) e_comp_object_frame_xy_adjust(ctx->client->frame, ctx->client->client.x, ctx->client->client.y, &ctx->client->x, &ctx->client->y); e_comp_object_frame_wh_adjust(ctx->client->frame, ctx->client->client.w, ctx->client->client.h, &ctx->client->w, &ctx->client->h); if (ctx->centered) e_comp_object_util_center(ctx->client->frame); + else if (ctx->placed) evas_object_move(o, ctx->x, ctx->y); + if (ctx->sized) evas_object_resize(o, ctx->w, ctx->h); return EINA_TRUE; } @@ -174,6 +178,7 @@ _e_elm_win_trap_move(void *data, Evas_Object *o, int x, int y) if ((x == ex) && (y == ey)) return EINA_FALSE; } ctx->placed = 1; + ctx->x = x, ctx->y = y; if (!ctx->client) return EINA_TRUE; if ((ctx->client->client.x != x) || (ctx->client->client.y != y)) e_client_util_move_without_frame(ctx->client, x, y); @@ -185,6 +190,8 @@ _e_elm_win_trap_resize(void *data, Evas_Object *o EINA_UNUSED, int w, int h) { Elm_Win_Trap_Ctx *ctx = data; EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE); + ctx->sized = 1; + ctx->w = w, ctx->h = h; if (!ctx->client) return EINA_TRUE; e_comp_object_frame_wh_adjust(ctx->client->frame, w, h, &w, &h); e_client_resize_limit(ctx->client, &w, &h); |