ecore_evas_wayland: fix bug ee's width and height were updated wrong place. 16/123016/2
authorJiyoun Park <jy0703.park@samsung.com>
Fri, 3 Mar 2017 02:11:05 +0000 (11:11 +0900)
committerJiyoun Park <jy0703.park@samsung.com>
Tue, 4 Apr 2017 07:51:47 +0000 (16:51 +0900)
   ecore evas manages the width and height using the ee->w/h and ee->req.w/h.
   but sometimes only ee->req value can be updated.

   opensource_commit fb730c1fd747539875a91bc35b51c51df56709d9
   Author: Jiyoun Park <jy0703.park@samsung.com>
   Date:   Fri Mar 3 10:27:00 2017 +0900

Change-Id: I05d104fd3a2a916e876dc1b9ec64e1ff5d533573

src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c

index ed19d10..e189b3e 100755 (executable)
@@ -771,7 +771,6 @@ void
 _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
 {
    Ecore_Evas_Engine_Wl_Data *wdata;
-   int orig_w, orig_h;
    int ow, oh;
    int diff = 0;
 
@@ -787,8 +786,11 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
 
    ee->req.w = w;
    ee->req.h = h;
-   orig_w = w;
-   orig_h = h;
+
+   /* TODO: wayland client can resize the ecore_evas directly.
+    * In the future, we will remove ee->req value in wayland backend */
+   ee->w = w;
+   ee->h = h;
 
    if (!ee->prop.fullscreen)
      {
@@ -896,8 +898,10 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
         else if (h < minh) 
           h = minh;
 
-        orig_w = w;
-        orig_h = h;
+        ee->w = w;
+        ee->h = h;
+        ee->req.w = w;
+        ee->req.h = h;
 
         if (ECORE_EVAS_PORTRAIT(ee))
           {
@@ -920,11 +924,6 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
 
    if (diff)
      {
-        ee->w = orig_w;
-        ee->h = orig_h;
-        ee->req.w = orig_w;
-        ee->req.h = orig_h;
-
         if (ECORE_EVAS_PORTRAIT(ee))
           {
              evas_output_size_set(ee->evas, w, h);