ignore first damage for X clients

when not dealing with a re_manage client (persisting from previous E instance), we're almost definitely going to get multiple full-window damages as a new client starts up. the first damage USUALLY results in a garbage render, so ignoring it makes the first frame become actual window content (good!) or a transparent rect until the client finishes drawing (not good!), which is at least an improvement over showing random pixels
This commit is contained in:
Mike Blumenkrantz 2014-01-20 19:01:04 -05:00
parent 30d6b2e196
commit 69d3e02638
2 changed files with 8 additions and 2 deletions

View File

@ -2453,6 +2453,12 @@ _e_comp_x_damage(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Dam
ecore_x_damage_subtract(ec->comp_data->damage, 0, parts);
ecore_x_region_free(parts);
}
if (!ec->comp_data->first_damage)
{
ec->comp_data->first_damage = 1;
if (!ec->re_manage)
return ECORE_CALLBACK_RENEW;
}
//WRN("DAMAGE %p: %dx%d", ec, ev->area.width, ev->area.height);
if (ec->comp->nocomp)

View File

@ -31,13 +31,13 @@ struct _E_Comp_Client_Data
Ecore_X_Sync_Alarm alarm;
Ecore_X_Sync_Counter sync_counter; // netwm sync counter
unsigned char misses; // number of sync misses
Ecore_X_Window_Attributes initial_attributes;
unsigned int move_counter; //reduce X calls when moving a window
unsigned int internal_props_set; //don't need to refetch our own internal props
Eina_Bool first_damage : 1; //ignore first damage on non-re_manage clients
struct
{
struct