From 69e39063dd2793522203763f83a91e5235f197a9 Mon Sep 17 00:00:00 2001 From: Gwanglim Lee Date: Fri, 25 Apr 2014 12:50:47 -0400 Subject: [PATCH] e_comp_object: update xy position of client in intercept_move to avoid unwanted first damage if given client is not a new_client Summary: xterm and pcmanfm windows shows black area if e is running with sw engine mode. (T1180) In this case, there are two problems: 1. Unwanted geometry info of first damage by wrong window move in intercept_move. (a) Handle x map request (b) Initialize client_inset value of comp object according to geometry value of "e.swallow.client" part (c) Set client_inset value to cw->client.x and y in intercept_move (d) Call ecore_x_window_move_resize with wrong x and y at idler (e) Create x damage (f) Handle unwanted damage notify event which has position values same as client_inset. (g) Copy image contents from pixmap according to wrong area info of damage notify and render it on screen. 2. Problem of override redirect window Black area of pcmanfm's menu is related to override redirect window. This patch only covers 1st problem not 2nd problem. The override redirect window should be fixed by another way. Test Plan: 1. Run e with sw engine mode or run x-ui.sh in e git simply 2. Run xterm which is using classic x drawing api 3. Check client window area of xterm Reviewers: raster, zmike, devilhorns CC: cedric Differential Revision: https://phab.enlightenment.org/D795 --- src/bin/e_comp_object.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index c4e063b5e..e0460138c 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -765,11 +765,6 @@ _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y) cw->ec->x = x, cw->ec->y = y; /* only update during resize if triggered by resize */ if (e_client_util_resizing_get(cw->ec) && (!cw->force_move)) return; - if (!cw->ec->shading) - { - cw->ec->client.x = ix; - cw->ec->client.y = iy; - } if (cw->ec->new_client) { /* don't actually do anything until first client idler loop */ @@ -778,7 +773,16 @@ _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y) EC_CHANGED(cw->ec); } else - evas_object_move(obj, x, y); + { + /* only update xy position of client to avoid invalid + * first damage region if it is not a new_client. */ + if (!cw->ec->shading) + { + cw->ec->client.x = ix; + cw->ec->client.y = iy; + } + evas_object_move(obj, x, y); + } } static void