account for race condition when creating initial comp object updates tiler

under wayland, some surfaces (eg. cursors) would attempt to show prior to
having acquired their actual size. these show attempts should be rejected
until the size has been set to ensure that rendering can proceed as expected

fix T2557
This commit is contained in:
Mike Blumenkrantz 2015-07-08 12:36:36 -04:00
parent 31f6c5b446
commit 9bdb805f48
1 changed files with 18 additions and 11 deletions

View File

@ -1401,6 +1401,24 @@ _e_comp_intercept_show_helper(E_Comp_Object *cw)
}
return;
}
if ((!cw->updates) && (!cw->ec->input_only) && (!cw->ec->ignored))
{
int pw, ph;
pw = cw->ec->client.w, ph = cw->ec->client.h;
if ((!pw) || (!ph))
e_pixmap_size_get(cw->ec->pixmap, &pw, &ph);
cw->updates = eina_tiler_new(pw, ph);
if (!cw->updates)
{
cw->ec->changes.visible = !cw->ec->hidden;
cw->ec->visible = 1;
EC_CHANGED(cw->ec);
return;
}
}
if (cw->updates)
eina_tiler_tile_size_set(cw->updates, 1, 1);
if (cw->ec->new_client)
{
/* ignore until client idler first run */
@ -1491,17 +1509,6 @@ _e_comp_intercept_show(void *data, Evas_Object *obj EINA_UNUSED)
#endif
cw->redirected = 1;
evas_object_color_set(cw->clip, ec->netwm.opacity, ec->netwm.opacity, ec->netwm.opacity, ec->netwm.opacity);
if ((!cw->ec->input_only) && (!cw->ec->ignored))
{
int w, h;
w = cw->ec->client.w, h = cw->ec->client.h;
if ((!w) || (!h))
e_pixmap_size_get(cw->ec->pixmap, &w, &h);
cw->updates = eina_tiler_new(w, h);
eina_tiler_tile_size_set(cw->updates, 1, 1);
}
}
_e_comp_intercept_show_helper(cw);