e_comp_wl: fix bug for creating region 07/185407/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Thu, 26 Jul 2018 12:48:04 +0000 (21:48 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Mon, 30 Jul 2018 08:24:01 +0000 (17:24 +0900)
There was a bug that the tiler size was wrong while handling creating region.
So, we add the code to check screen rotation value.

Change-Id: I8b39305aadfe434fe6c1c4f7aad98b5bb1da1e7b

src/bin/e_comp_wl.c

index 47e01bd..876d24c 100644 (file)
@@ -3300,11 +3300,23 @@ _e_comp_wl_compositor_cb_region_create(struct wl_client *client, struct wl_resou
 {
    Eina_Tiler *tiler;
    struct wl_resource *res;
+   int w, h;
 
    DBG("Region Create: %d", wl_resource_get_id(resource));
 
    /* try to create new tiler */
-   if (!(tiler = eina_tiler_new(e_comp->w, e_comp->h)))
+   if (e_comp->e_comp_screen->rotation % 180)
+     {
+        w = e_comp->h;
+        h = e_comp->w;
+     }
+   else
+     {
+        w = e_comp->w;
+        h = e_comp->h;
+     }
+
+   if (!(tiler = eina_tiler_new(w, h)))
      {
         ERR("Could not create Eina_Tiler");
         wl_resource_post_no_memory(resource);