ecore_wl2_window: modify code to check pending.user_resize before sending configure... 13/307013/2
authorDoyoun Kang <doyoun.kang@samsung.com>
Mon, 4 Mar 2024 02:01:46 +0000 (11:01 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Mon, 4 Mar 2024 06:54:28 +0000 (06:54 +0000)
Change-Id: I4acfe25b75cec3585b60c39a3e9000e49bfbffa2

src/lib/ecore_wl2/ecore_wl2_window.c

index b651d9b..912e834 100644 (file)
@@ -185,6 +185,20 @@ _ecore_wl2_window_configure_send(Ecore_Wl2_Window *win)
              ev->h = win->saved.h;
              size_type = 7;
           }
+        else if (win->pending.user_resize)
+          {
+             // use pended user size
+             ev->w = win->pending.user_w;
+             ev->h = win->pending.user_h;
+             win->pending.user_resize = EINA_FALSE;
+             size_type = 10;
+          }
+
+        if (win->pending.user_resize)
+          {
+             ERR("[WINDOW] win:%d, CHECK.. pending.user_resize:%d, size(%dx%d) BUT NOT USED..", win->resource_id,win->pending.user_resize, win->pending.user_w, win->pending.user_h);
+             win->pending.user_resize = EINA_FALSE;
+          }
      }
    else
      {
@@ -205,6 +219,7 @@ _ecore_wl2_window_configure_send(Ecore_Wl2_Window *win)
                        // use pended user size
                        ev->w = win->pending.user_w;
                        ev->h = win->pending.user_h;
+                       win->pending.user_resize = EINA_FALSE;
                        size_type = 8;
                     }
                   else
@@ -221,6 +236,7 @@ _ecore_wl2_window_configure_send(Ecore_Wl2_Window *win)
                     {
                        ev->w = win->pending.user_w;
                        ev->h = win->pending.user_h;
+                       win->pending.user_resize = EINA_FALSE;
                        size_type = 6;
                     }
                   else
@@ -241,7 +257,12 @@ _ecore_wl2_window_configure_send(Ecore_Wl2_Window *win)
                     }
                }
           }
-        win->pending.user_resize = EINA_FALSE;
+
+        if (win->pending.user_resize)
+          {
+             ERR("[WINDOW] win:%d, CHECK.. pending.user_resize:%d, size(%dx%d) BUT NOT USED..", win->resource_id,win->pending.user_resize, win->pending.user_w, win->pending.user_h);
+             win->pending.user_resize = EINA_FALSE;
+          }
      }
 /*
    if ((win->set_config.geometry.w == win->def_config.geometry.w) &&
@@ -295,6 +316,10 @@ _ecore_wl2_window_configure_send_by_client(Ecore_Wl2_Window *win)
    ev->h = win->set_config.geometry.h;
    ev->edges = !!win->req_config.resizing;
 
+   ERR("[WINDOW] Generate WINDOW_CONFIGURE event by client.. win:%d, states:%d, geo(%d,%d,%dx%d), def(size:%dx%d,serial:%d)",
+                  win->resource_id, ev->states, ev->x, ev->y, ev->w, ev->h,
+                  win->def_config.geometry.w, win->def_config.geometry.h, win->def_config.serial);
+
    ecore_event_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE, ev, NULL, NULL);
 }
 //