From 1b3500f31a2e93be04cb6d0075ee3c3ed84a4f9e Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 15 Jan 2014 13:03:16 +0000 Subject: [PATCH] Tiling2: Added an hack to workaround the stupid e resize bug. The bug with the frame created after the first resize. --- src/modules/tiling/e_mod_tiling.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/modules/tiling/e_mod_tiling.c b/src/modules/tiling/e_mod_tiling.c index b317e2645..43bd45f5a 100644 --- a/src/modules/tiling/e_mod_tiling.c +++ b/src/modules/tiling/e_mod_tiling.c @@ -49,6 +49,7 @@ typedef struct Client_Extra { } orig; overlay_t overlay; char key[4]; + int last_frame_adjustment; // FIXME: Hack for frame resize bug. } Client_Extra; struct tiling_g tiling_g = { @@ -242,6 +243,15 @@ _e_client_move_resize(E_Client *ec, int w, int h) { + Client_Extra *extra; + + extra = eina_hash_find(_G.client_extras, &ec); + if (!extra) { + ERR("No extra for %p", ec); + return; + } + + extra->last_frame_adjustment = MAX(ec->h - ec->client.h, ec->w - ec->client.w); DBG("%p -> %dx%d+%d+%d", ec, w, h, x, y); evas_object_geometry_set(ec->frame, x, y, w, h); } @@ -639,6 +649,13 @@ static void _move_or_resize(E_Client *ec) return; } + if (!extra->last_frame_adjustment) + { + printf("This is probably because of the frame adjustment bug. Return\n"); + _reapply_tree(); + return; + } + Window_Tree *item = tiling_window_tree_client_find(_G.tinfo->tree, ec); if (!item) {