e_comp_wl: pending geometry is applied once size is fit 20/186620/9
authorJuyeon Lee <juyeonne.lee@samsung.com>
Mon, 13 Aug 2018 02:21:09 +0000 (11:21 +0900)
committerJuyeon Lee <juyeonne.lee@samsung.com>
Mon, 10 Sep 2018 11:32:12 +0000 (11:32 +0000)
todo : the code will be reverted once client serial commit works

Change-Id: Ia6f38624fa6ea735acd82110f746b7831b3ee05f

src/bin/e_comp_wl.c

index 1e40f852eefa84240f9fb41d97eba5d6d3f0e721..c5216b60dc539fbd0d091318d0ecbbda0f673070 100644 (file)
@@ -6303,7 +6303,7 @@ e_comp_wl_commit_sync_configure(E_Client *ec)
    Eina_List *l;
    E_Client_Pending_Geometry *geo;
    E_Client_Demand_Geometry change = 0;
-   int bw, bh;
+   int bw, bh, cntfit, bfit;
    struct
      {
         int x, y, w, h;
@@ -6312,19 +6312,41 @@ e_comp_wl_commit_sync_configure(E_Client *ec)
    if (!ec || !ec->frame) goto ret;
    if (e_object_is_del(E_OBJECT(ec))) goto ret;
 
-   bw = bh = 0;
+   bw = bh = cntfit = bfit = 0;
    config.x = ec->x; config.y = ec->y; config.w = ec->w; config.h = ec->h;
    //if (!e_pixmap_size_get(ec->pixmap, &bw, &bh)) goto err;
    e_pixmap_size_get(ec->pixmap, &bw, &bh);
 
    if (eina_list_count(ec->surface_sync.pending_geometry))
      {
+        /* if buffer size is not match with resize request, than
+           break the loop and wait next wl buffer.
+           as a result, move or resize request would be blocked
+           during the period of client attachements if it is not a proper size buffer.
+           TODO : the code will remove out if client serial commit works ::start*/
         EINA_LIST_FOREACH(ec->surface_sync.pending_geometry, l, geo)
           {
+             ++cntfit;
+             if (geo->mode | E_GEOMETRY_SIZE)
+               {
+                  // last index of the same size buffer
+                  if ((geo->w == bw) || (geo->h == bh))
+                    bfit = cntfit;
+               }
+          }
+        if (!bfit) goto err;
+        cntfit = 0;
+        /*TODO : the code will remove out if client serial commit works ::end*/
+
+
+        EINA_LIST_FOREACH(ec->surface_sync.pending_geometry, l, geo)
+          {
+             ++cntfit;
              if (geo->serial <= ec->surface_sync.serial)
                {
                   if (geo->mode & E_GEOMETRY_SIZE)
                     {
+                       if (cntfit > bfit) break; //the code will remove out if client serial commit works
                        config.w = geo->w; config.h = geo->h;
                     }
                   if (geo->mode & E_GEOMETRY_POS)