e_comp_wl: Merge related but distant implementations together 57/318257/1
authorSeunghun Lee <shiin.lee@samsung.com>
Mon, 13 Jan 2025 09:44:33 +0000 (18:44 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 15 Jan 2025 00:34:48 +0000 (09:34 +0900)
This deprecates `buf_size` field of E_Client.
This may change the time emitting E_COMP_WL_HOOK_BUFFER_SIZE_CHANGE
event.

Change-Id: I7ee6721bf19216054c88dae78b0d5f306cf7f7a2

src/bin/server/e_comp_wl.c
src/include/e_client.h

index 8437bc9d365c7b6fcf55cfe4dfc58a9f51c85e1c..656e298a876b6388d6eb56e1fe1134cd3b92bc92 100644 (file)
@@ -2566,7 +2566,16 @@ _e_comp_wl_surface_state_size_update(E_Client *ec, E_Comp_Wl_Surface_State *stat
    if ((prev_w != state->bw) ||
        (prev_h != state->bh))
      {
-        ec->changes.buf_size = EINA_TRUE;
+        ELOGF("COMP", "Buffer size is changed. size(%d,%d)", ec, state->bw, state->bh);
+        _e_comp_wl_hook_call(E_COMP_WL_HOOK_BUFFER_SIZE_CHANGE, ec);
+
+        if (ec->move_after_resize)
+          {
+             ELOGF("POSSIZE", "Unset move_after_resize. ec_geo(%d,%d,%dx%d)", ec, ec->x, ec->y, ec->w, ec->h);
+             ec->move_after_resize = EINA_FALSE;
+             ec->changes.pos = EINA_TRUE;
+             EC_CHANGED(ec);
+          }
      }
 
    if (e_view_client_frame_exists(e_client_view_get(ec))) return;
@@ -2985,21 +2994,6 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
                   EC_CHANGED(ec);
                }
           }
-
-        if (ec->changes.buf_size)
-          {
-             ELOGF("COMP", "Buffer size is changed. size(%d,%d)", ec, state->bw, state->bh);
-             _e_comp_wl_hook_call(E_COMP_WL_HOOK_BUFFER_SIZE_CHANGE, ec);
-             ec->changes.buf_size = EINA_FALSE;
-
-             if (ec->move_after_resize)
-               {
-                  ELOGF("POSSIZE", "Unset move_after_resize. ec_geo(%d,%d,%dx%d)", ec, ec->x, ec->y, ec->w, ec->h);
-                  ec->move_after_resize = EINA_FALSE;
-                  ec->changes.pos = EINA_TRUE;
-                  EC_CHANGED(ec);
-               }
-          }
      }
 
    /* map or unmap ec */
index c282192b53d9a230add9b8bc157ee11d81b2f117..b88da5c3499d7b4ff1729caec98f5606d6e4c59f 100644 (file)
@@ -566,7 +566,7 @@ struct _E_Client
       Eina_Bool accepts_focus : 1;
       Eina_Bool tz_position : 1; /* true when new position is set using tizen_position interface */
       unsigned char title : 1;
-      unsigned char buf_size : 1;
+      E_DEPRECATED unsigned char buf_size : 1;
    } changes;
 
    struct