e_client: add the layout information to E_Client_Private 66/315366/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Sat, 27 Jul 2024 04:54:20 +0000 (13:54 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 31 Jul 2024 02:20:02 +0000 (11:20 +0900)
Change-Id: Icea434b8972daf697aa57ea594558a8fdd802ed2

src/bin/core/e_client.c
src/bin/core/e_client_intern.h
src/bin/debug/e_info_server.c
src/include/e_client.h

index 4311e79..d0f6e82 100644 (file)
@@ -121,6 +121,13 @@ struct _E_Client_Private
    E_Client *modal;
 
    E_View_Client *view_client;
+
+   struct
+   {
+      int x, y;
+      unsigned int w, h;
+      Eina_Bool apply;
+   } layout_info;
 };
 
 static int _e_client_hooks_delete = 0;
@@ -4227,6 +4234,7 @@ e_client_layout_set(E_Client *ec, uint32_t num_cols, uint32_t num_rows, uint32_t
    ELOGF("TZPOL", "Consider Shadow size(l:%d,r:%d,t:%d,b:%d). new (%d,%d,%dx%d)",
          ec, ec->manage_resize.shadow.l, ec->manage_resize.shadow.r, ec->manage_resize.shadow.t, ec->manage_resize.shadow.b, x, y, w, h);
 
+   e_client_layout_geometry_set(ec, x, y, w, h);
    e_client_layout_apply(ec, EINA_TRUE);
    e_client_frame_geometry_set(ec, x, y, w, h);
 
@@ -6434,15 +6442,15 @@ e_client_desk_zoom_enable_get(E_Client *ec)
 EINTERN void
 e_client_layout_apply(E_Client *ec, Eina_Bool apply)
 {
-   if (!ec) return;
-   ec->apply_layout = apply;
+   API_ENTRY;
+   priv->layout_info.apply = apply;
 }
 
 EINTERN Eina_Bool
 e_client_is_layout_apply(E_Client *ec)
 {
-   if (!ec) return EINA_FALSE;
-   return ec->apply_layout;
+   API_ENTRY_VAL(EINA_FALSE);
+   return priv->layout_info.apply;
 }
 
 E_API E_Client *
@@ -7473,6 +7481,30 @@ e_client_client_geometry_get(E_Client *ec, int *x, int *y, int *w, int *h)
    return EINA_TRUE;
 }
 
+EINTERN void
+e_client_layout_geometry_set(E_Client *ec, int x, int y, unsigned int w, unsigned int h)
+{
+   API_ENTRY;
+
+   priv->layout_info.x = x;
+   priv->layout_info.y = y;
+   priv->layout_info.w = w;
+   priv->layout_info.h = h;
+}
+
+E_API Eina_Bool
+e_client_layout_geometry_get(E_Client *ec, int *x, int *y, unsigned int *w, unsigned int *h)
+{
+   API_ENTRY_VAL(EINA_FALSE);
+
+   if (x) *x = priv->layout_info.x;
+   if (y) *y = priv->layout_info.y;
+   if (w) *w = priv->layout_info.w;
+   if (h) *h = priv->layout_info.h;
+
+   return EINA_TRUE;
+}
+
 E_API int
 e_client_client_type_get(E_Client *ec)
 {
index 6024065..8925313 100644 (file)
@@ -62,6 +62,8 @@ EINTERN Eina_Bool e_client_base_output_resolution_rsm_update(E_Client *bind_ec,
 
 EINTERN E_Pixmap *e_client_pixmap_change(E_Client *ec, E_Pixmap *newcp);
 
+EINTERN void      e_client_layout_geometry_set(E_Client *ec, int x, int y, unsigned int w, unsigned int h);
+
 EINTERN void      e_client_frame_geometry_set(E_Client *ec, int x, int y, int w, int h);
 EINTERN void      e_client_frame_update(E_Client *ec);
 
index 050f909..ec39126 100644 (file)
@@ -408,7 +408,7 @@ _msg_ecs_append(Eldbus_Message_Iter *iter, Eina_Bool is_visible)
             x, y, w, h, ec->layer,
             ec->visible, mapped, ec->argb, ec->visibility.opaque, e_client_visibility_get(ec), ec->visibility.force_obscured, iconified,
             evas_object_visible_get(ec->frame), ec->focused, hwc, hwc_policy, pl_zpos, pwin, layer_name, has_input_region, transformed, ec->transient_policy,
-            zone_id, ec->apply_layout);
+            zone_id, e_client_is_layout_apply(ec));
 
         eldbus_message_iter_container_close(array_of_ec, struct_of_ec);
      }
@@ -511,7 +511,7 @@ _msg_clients_append(Eldbus_Message_Iter *iter, Eina_Bool is_visible)
             ec->x, ec->y, ec->w, ec->h, ec->layer,
             ec->visible, mapped, ec->argb, ec->visibility.opaque, e_client_visibility_get(ec), ec->visibility.force_obscured, iconified,
             evas_object_visible_get(ec->frame), ec->focused, hwc, hwc_policy, pl_zpos, pwin, layer_name, has_input_region, transformed, ec->transient_policy,
-            zone_id, ec->apply_layout);
+            zone_id, e_client_is_layout_apply(ec));
 
         eldbus_message_iter_container_close(array_of_ec, struct_of_ec);
      }
index d9669ac..502c965 100644 (file)
@@ -1248,6 +1248,7 @@ E_API void      e_client_changes_accpets_focus_set(E_Client *ec, Eina_Bool chang
 E_API void      e_client_changed_set(E_Client *ec, Eina_Bool change);
 
 E_API Eina_Bool e_client_client_geometry_get(E_Client *ec, int *x, int *y, int *w, int *h);
+E_API Eina_Bool e_client_layout_geometry_get(E_Client *ec, int *x, int *y, unsigned int *w, unsigned int *h);
 E_API int e_client_client_type_get(E_Client *ec);
 
 E_API void      e_client_e_fetch_rot_available_rots_set(E_Client *ec, Eina_Bool set);