From a5bd16603f83596b286940a012230db7f20a7234 Mon Sep 17 00:00:00 2001 From: Gwanglim Lee Date: Sat, 26 Apr 2014 13:17:13 -0400 Subject: [PATCH] e_comp_x: fix black area of override redirect win Summary: Black area of override redirect window could send damage notify which has unwanted xy position. (a) Skip x configure notify with 3,55 316x162 of override redirect win (b) Handle x show notify: create a new client and x damage for override redirect win (c) Handle x damage notify with 3,55 316x162 To resolve it, E discards unwanted xy position of first damage for override redirect window. This fixes remained problem of T1180 and T1188. Test Plan: 1. Run e with sw engine mode 2. Run pcmanfm 3. Select menu in pcmanfm 4. Check whether menu window has black area Reviewers: raster, zmike, devilhorns CC: cedric Differential Revision: https://phab.enlightenment.org/D800 --- src/bin/e_comp_x.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c index eb2ec4aa4..494d8299d 100644 --- a/src/bin/e_comp_x.c +++ b/src/bin/e_comp_x.c @@ -2502,9 +2502,13 @@ _e_comp_x_damage(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Dam if (ec->comp->nocomp) e_pixmap_dirty(ec->pixmap); + /* discard unwanted xy position of first damage + * to avoid wrong composition for override redirect window */ + else if ((ec->override) && (!ec->comp_data->first_damage)) + e_comp_object_damage(ec->frame, 0, 0, ev->area.width, ev->area.height); else e_comp_object_damage(ec->frame, ev->area.x, ev->area.y, ev->area.width, ev->area.height); - if ((!ec->re_manage) && (!ec->comp_data->first_damage)) + if ((!ec->re_manage) && (!ec->override) && (!ec->comp_data->first_damage)) e_comp_object_render_update_del(ec->frame); else E_FREE_FUNC(ec->comp_data->first_draw_delay, ecore_timer_del); @@ -4034,7 +4038,7 @@ _e_comp_x_hook_client_new(void *d EINA_UNUSED, E_Client *ec) if (!_e_comp_x_client_new_helper(ec)) return; - ec->comp_data->first_damage = ec->internal || ec->override; + ec->comp_data->first_damage = ec->internal; eina_hash_add(clients_win_hash, &win, ec); e_hints_client_list_set();