return;
}
- /* clear any pending buffer
- *
- * NB: This will call any buffer_destroy function associated */
+ /* clear any pending buffer */
if (ec->comp_data->pending.buffer)
- wl_list_remove(&ec->comp_data->pending.buffer_destroy.link);
+ wl_resource_queue_event(ec->comp_data->pending.buffer->resource,
+ WL_BUFFER_RELEASE);
+
+ /* if (ec->comp_data->pending.buffer) */
+ /* wl_list_remove(&ec->comp_data->pending.buffer_destroy.link); */
/* reset client pending information */
ec->comp_data->pending.x = 0;
ec->comp_data->pending.w = 0;
ec->comp_data->pending.h = 0;
ec->comp_data->pending.buffer = NULL;
- ec->comp_data->pending.new_attach = EINA_TRUE;
+ ec->comp_data->pending.new_attach = EINA_FALSE;
if (buffer_resource)
{
ec->comp_data->pending.x = sx;
ec->comp_data->pending.y = sy;
ec->comp_data->pending.buffer = buffer;
-
+ ec->comp_data->pending.new_attach = EINA_TRUE;
+
/* check for this resource being a shm buffer */
if ((shmb = wl_shm_buffer_get(buffer_resource)))
{
/* add buffer destroy signal so we get notified when this buffer
* gets destroyed (callback set in buffer_get function) */
- wl_signal_add(&buffer->destroy_signal,
- &ec->comp_data->pending.buffer_destroy);
+ /* wl_signal_add(&buffer->destroy_signal, */
+ /* &ec->comp_data->pending.buffer_destroy); */
}
}
}
}
+ if (e_object_is_del(E_OBJECT(ec))) return;
if (!ec->comp_data) return;
/* create new damage rectangle */
- dmg = eina_rectangle_new(x, y, w, h);
+ if (!(dmg = eina_rectangle_new(x, y, w, h))) return;
/* add damage rectangle to list of pending damages */
ec->comp_data->pending.damages =
if (ec->comp_data->pending.new_attach)
{
- /* TODO: buffer reference */
-
if (ec->comp_data->pending.buffer)
e_pixmap_resource_set(ep, ec->comp_data->pending.buffer->resource);
else
e_pixmap_usable_set(ep, (ec->comp_data->pending.buffer != NULL));
}
+ else
+ {
+ e_pixmap_resource_set(ep, NULL);
+ e_pixmap_usable_set(ep, (ec->comp_data->pending.buffer != NULL));
+ }
/* mark the pixmap as dirty */
e_pixmap_dirty(ep);
}
}
+ if (ec->comp_data->pending.buffer)
+ wl_resource_queue_event(ec->comp_data->pending.buffer->resource,
+ WL_BUFFER_RELEASE);
+
+ /* reset client pending information */
+ ec->comp_data->pending.x = 0;
+ ec->comp_data->pending.y = 0;
+ ec->comp_data->pending.w = 0;
+ ec->comp_data->pending.h = 0;
+ ec->comp_data->pending.buffer = NULL;
+ ec->comp_data->pending.new_attach = EINA_FALSE;
+
if (!ec->visible)
{
DBG("\tSurface Not Visible. Skip to Unmapped");