fix X shape exporting when bounding box changes
this fixes rendering on shaped clients like yakuake and makes them render even more accurately than E18 PS. I hate shape extension.
This commit is contained in:
parent
cbfee4f53e
commit
32d4c2f2b9
|
@ -2414,10 +2414,26 @@ _e_comp_x_shape(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Wind
|
||||||
ec->need_shape_merge = 1;
|
ec->need_shape_merge = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ec->changes.shape = 1;
|
{
|
||||||
|
if ((ec->comp_data->shape.x != ev->x) ||
|
||||||
|
(ec->comp_data->shape.y != ev->y) ||
|
||||||
|
(ec->comp_data->shape.w != ev->w) ||
|
||||||
|
(ec->comp_data->shape.h != ev->h))
|
||||||
|
{
|
||||||
|
/* bounding box changed, need export for rendering */
|
||||||
|
EINA_RECTANGLE_SET(&ec->comp_data->shape, ev->x, ev->y, ev->w, ev->h);
|
||||||
|
ec->need_shape_export = 1;
|
||||||
|
}
|
||||||
|
ec->changes.shape = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (ec->shaped) //shape change on parent window only valid if window is known to be shaped
|
else if (ec->shaped) //shape change on parent window only valid if window is known to be shaped
|
||||||
ec->need_shape_export = 1;
|
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);
|
||||||
|
}
|
||||||
EC_CHANGED(ec);
|
EC_CHANGED(ec);
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
}
|
}
|
||||||
|
@ -2590,6 +2606,7 @@ _e_comp_x_hook_client_post_new_client(void *d EINA_UNUSED, E_Client *ec)
|
||||||
ec->shape_rects = (Eina_Rectangle*)rects;
|
ec->shape_rects = (Eina_Rectangle*)rects;
|
||||||
ec->shape_rects_num = num;
|
ec->shape_rects_num = num;
|
||||||
ec->shape_changed = 1;
|
ec->shape_changed = 1;
|
||||||
|
e_comp_shape_queue(ec->comp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
free(rects);
|
free(rects);
|
||||||
|
|
|
@ -20,6 +20,7 @@ struct _E_Comp_Client_Data
|
||||||
Ecore_X_Visual vis; // window visual
|
Ecore_X_Visual vis; // window visual
|
||||||
Ecore_X_Colormap cmap; // colormap of window
|
Ecore_X_Colormap cmap; // colormap of window
|
||||||
int pw, ph; //XPRESENT!
|
int pw, ph; //XPRESENT!
|
||||||
|
Eina_Rectangle shape; //SHAPE
|
||||||
|
|
||||||
#if 0 //NOT USED
|
#if 0 //NOT USED
|
||||||
Ecore_X_Pixmap cache_pixmap; // the cached pixmap (1/nth the dimensions)
|
Ecore_X_Pixmap cache_pixmap; // the cached pixmap (1/nth the dimensions)
|
||||||
|
|
Loading…
Reference in New Issue