From: Doyoun Kang Date: Sat, 27 Jul 2024 04:54:20 +0000 (+0900) Subject: e_client: add the layout information to E_Client_Private X-Git-Tag: accepted/tizen/unified/20240805.114525~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2059199a014567ffd872dbff843fbe3a308f02a;p=platform%2Fupstream%2Fenlightenment.git e_client: add the layout information to E_Client_Private Change-Id: Icea434b8972daf697aa57ea594558a8fdd802ed2 --- diff --git a/src/bin/core/e_client.c b/src/bin/core/e_client.c index 4311e79..d0f6e82 100644 --- a/src/bin/core/e_client.c +++ b/src/bin/core/e_client.c @@ -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) { diff --git a/src/bin/core/e_client_intern.h b/src/bin/core/e_client_intern.h index 6024065..8925313 100644 --- a/src/bin/core/e_client_intern.h +++ b/src/bin/core/e_client_intern.h @@ -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); diff --git a/src/bin/debug/e_info_server.c b/src/bin/debug/e_info_server.c index 050f909..ec39126 100644 --- a/src/bin/debug/e_info_server.c +++ b/src/bin/debug/e_info_server.c @@ -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); } diff --git a/src/include/e_client.h b/src/include/e_client.h index d9669ac..502c965 100644 --- a/src/include/e_client.h +++ b/src/include/e_client.h @@ -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);