Fixed trying to create damage area with 0x0 size
authorMinJeong Kim <minjjj.kim@samsung.com>
Thu, 10 Jul 2014 13:38:30 +0000 (09:38 -0400)
committerChris Michael <cp.michael@samsung.com>
Tue, 26 Aug 2014 14:10:38 +0000 (10:10 -0400)
Summary:
This revision fixed failure to create damage area using Eina_Tiler on surface damage callback.
It was caused by trying to create Eina_Tiler with 0x0 size which is from size of E_Client.

Test Plan:
1. Run elementary_test.
2. Select one of the test apps.(no more magic fail message)

Reviewers: zmike, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, gwanglim

Differential Revision: https://phab.enlightenment.org/D1171

src/bin/e_comp_wl.c

index 83614c8..46abd18 100644 (file)
@@ -195,7 +195,7 @@ _e_comp_wl_surface_cb_damage(struct wl_client *client EINA_UNUSED, struct wl_res
    if ((!ec) || (e_object_is_del(E_OBJECT(ec)))) return;
    if (!ec->wl_comp_data) return;
 
-   tmp = eina_tiler_new(ec->w, ec->h);
+   tmp = eina_tiler_new(ec->w ?: w, ec->h ?: h);
    eina_tiler_tile_size_set(tmp, 1, 1);
    eina_tiler_rect_add(tmp, &(Eina_Rectangle){x, y, w, h});