From 2a67b3a89972e9ed73bdf7cb53d315f10aed09bb Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 21 Apr 2016 18:04:16 -0400 Subject: [PATCH] ensure damages do not get added for shapeless x11 clients ref 32d4c2f2b98e663df4bd34cec2bae25ddfdd07ea ref T3157 --- src/bin/e_comp_x.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c index 713c39bde..74f74e489 100644 --- a/src/bin/e_comp_x.c +++ b/src/bin/e_comp_x.c @@ -2938,6 +2938,7 @@ static Eina_Bool _e_comp_x_shape(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Window_Shape *ev) { E_Client *ec; + Eina_Bool pshaped; //const char *txt[] = //{ //[ECORE_X_SHAPE_BOUNDING] = "BOUNDING", @@ -2947,6 +2948,7 @@ _e_comp_x_shape(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Wind ec = _e_comp_x_client_find_by_window(ev->win); if (!ec) return ECORE_CALLBACK_RENEW; + pshaped = ec->shaped; //INF("%p(%s): %d,%d %dx%d || %d", ec, txt[ev->type], ev->x, ev->y, ev->w, ev->h, ev->shaped); if (ev->win == e_client_util_win_get(ec)) { @@ -2973,8 +2975,11 @@ _e_comp_x_shape(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Wind ec->need_shape_export = 1; if (ec->changes.shape) { - if (ev->type == ECORE_X_SHAPE_BOUNDING) - e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h); + if ((ev->type == ECORE_X_SHAPE_BOUNDING) && (ec->shaped || (pshaped != ec->shaped))) + { + if (ec->shape_rects || (!ec->shaped)) + e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h); + } } EC_CHANGED(ec); return ECORE_CALLBACK_PASS_ON; @@ -4532,7 +4537,8 @@ _e_comp_x_first_draw_delay_cb(void *data) E_Client *ec = data; _e_comp_x_client_data_get(ec)->first_draw_delay = NULL; - e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h); + if (ec->shape_rects || (!ec->shaped)) + e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h); return EINA_FALSE; }