e_client: add resize_edges to e_client 61/322061/1
authorSooChan Lim <sc1.lim@samsung.com>
Wed, 2 Apr 2025 08:14:24 +0000 (17:14 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Thu, 3 Apr 2025 04:50:48 +0000 (13:50 +0900)
The resize_edges is the attribute of the shell interface, so
the resize_edges value is stored at e_client instead of e_comp_wl.

Change-Id: Ic382c5c7d77c6753f3d1ae69b3e7883e1d82b6e1

src/bin/core/e_client.c
src/bin/core/e_client_intern.h
src/bin/server/e_comp_wl.c
src/bin/server/e_comp_wl_shell.c
src/bin/windowmgr/e_policy_desk_area.c
src/include/e_comp_wl.h

index 448c95466a85643fe0d7ab9b592eee4ff1d91517..13a755562dd884fb8fac9371f8fb3a091f97bd57 100644 (file)
@@ -147,6 +147,8 @@ struct _E_Client_Private
         int       fingers;
         int       threshold;
      } virtual_touch;
+
+   uint32_t resize_edges;
 };
 
 static int _e_client_hooks_delete = 0;
@@ -8245,3 +8247,21 @@ e_client_is_input_acceptable(E_Client *ec)
 
    return EINA_TRUE;
 }
+
+EINTERN void
+e_client_resize_edges_set(E_Client *ec, uint32_t edges)
+{
+   if (!ec) return;
+
+   if (PRI(ec)->resize_edges == edges) return;
+
+   PRI(ec)->resize_edges = edges;
+}
+
+EINTERN uint32_t
+e_client_resize_edges_get(E_Client *ec)
+{
+   if (!ec) return 0;
+
+   return PRI(ec)->resize_edges;
+}
\ No newline at end of file
index 5550b4c0f296d0a135db6cf7ba26ba364d447aec..214528ad589f682f7dd4c9b98cb9c4e042e11951 100644 (file)
@@ -272,4 +272,7 @@ EINTERN Eina_Bool e_client_buffer_flush_enabled_get(E_Client *ec);
 
 Eina_Bool e_client_is_input_acceptable(E_Client *ec);
 
+EINTERN void e_client_resize_edges_set(E_Client *ec, uint32_t edges);
+EINTERN uint32_t e_client_resize_edges_get(E_Client *ec);
+
 #endif
index 788527af4d21ccd3ee5e30e0801a20f49c7617f6..1d084bb0635bb7f7f25767e2dae41f6309464586 100644 (file)
@@ -271,7 +271,6 @@ static void
 _e_comp_wl_configure_send(E_Client *ec, Eina_Bool edges, Eina_Bool send_size)
 {
    int w, h;
-   E_Comp_Wl_Data *comp_wl;
 
    if (send_size)
      {
@@ -286,8 +285,7 @@ _e_comp_wl_configure_send(E_Client *ec, Eina_Bool edges, Eina_Bool send_size)
         w = h = -1;
      }
 
-   comp_wl = e_comp_wl_get();
-   e_client_shell_configure_send(ec, edges * comp_wl->resize.edges, w, h);
+   e_client_shell_configure_send(ec, edges * e_client_resize_edges_get(ec), w, h);
 }
 
 static void
@@ -3479,14 +3477,10 @@ _e_comp_wl_client_cb_resize_begin(void *data EINA_UNUSED, E_Client *ec)
 static void
 _e_comp_wl_client_cb_resize_end(void *data EINA_UNUSED, E_Client *ec)
 {
-   E_Comp_Wl_Data *comp_wl;
-
    if (e_object_is_del(E_OBJECT(ec))) return;
    if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
 
-   comp_wl = e_comp_wl_get();
-   comp_wl->resize.edges = 0;
-   comp_wl->resize.resource = NULL;
+   e_client_resize_edges_set(ec, 0);
 }
 
 static void
index ef83064611ecc9245e043b8670f9b29780c64aa1..76689a227b76648afe471658ab50e71faae5e8c1 100644 (file)
@@ -333,10 +333,9 @@ e_shell_e_client_interactive_resize(E_Client *ec,
    TRACE_DS_BEGIN(SHELL:SURFACE RESIZE REQUEST CB);
 
    e_client_layout_apply(ec, EINA_FALSE);
+   e_client_resize_edges_set(ec, edges);
 
    comp_wl = e_comp_wl_get();
-   comp_wl->resize.resource = resource;
-   comp_wl->resize.edges = edges;
    comp_wl->ptr.grab_x = comp_wl->ptr.x - wl_fixed_from_int(ec->client.x);
    comp_wl->ptr.grab_y = comp_wl->ptr.y - wl_fixed_from_int(ec->client.y);
 
index e2bdee675b5b39ad3caa7c941d2024b45a993858..59428cc1b7f6568f0a0d95cde999ec51491cdaf7 100644 (file)
@@ -1919,7 +1919,6 @@ static void
 _e_policy_desk_area_configure_send(E_Client *ec, Eina_Bool edges, Eina_Bool send_size)
 {
    int w, h;
-   E_Comp_Wl_Data *comp_wl;
 
    if (send_size)
      {
@@ -1934,8 +1933,7 @@ _e_policy_desk_area_configure_send(E_Client *ec, Eina_Bool edges, Eina_Bool send
         w = h = -1;
      }
 
-   comp_wl = e_comp_wl_get();
-   e_client_shell_configure_send(ec, edges * comp_wl->resize.edges, w, h);
+   e_client_shell_configure_send(ec, edges * e_client_resize_edges_get(ec), w, h);
 }
 
 static void
@@ -2637,7 +2635,6 @@ _desk_area_cb_comp_object_resize(struct wl_listener *listener, void *data)
 {
    E_Policy_Desk_Area_Private_Client *eda_client;
    E_Client *ec;
-   E_Comp_Wl_Data *comp_wl;
 
    eda_client = wl_container_of(listener, eda_client, comp_object_resize);
    ec = eda_client->ec;
@@ -2647,8 +2644,7 @@ _desk_area_cb_comp_object_resize(struct wl_listener *listener, void *data)
    if (!ec->comp_data->shell.configure_send) return;
 
    /* TODO: calculate x, y with transfrom object */
-   comp_wl = e_comp_wl_get();
-   if ((e_client_util_resizing_get(ec)) && (comp_wl->resize.edges))
+   if ((e_client_util_resizing_get(ec)) && (e_client_resize_edges_get(ec)))
      {
         int w, h;
 
@@ -2691,7 +2687,7 @@ _desk_area_cb_comp_object_resize(struct wl_listener *listener, void *data)
         h = E_CLAMP(h, 1, h);
         e_client_resize_limit(ec, &w, &h);
 
-        e_client_shell_configure_send(ec, comp_wl->resize.edges, w, h);
+        e_client_shell_configure_send(ec, e_client_resize_edges_get(ec), w, h);
      }
    else if ((!ec->fullscreen) && (!ec->maximized) &&
             (!e_client_maximize_pre_get(ec)))
index f36907e90d8c3804897b367ad81f2c9208b190d8..85b78a7e83eef4a0a9452b95e8c7cdcef152634b 100644 (file)
@@ -326,9 +326,9 @@ struct _E_Comp_Wl_Data
 
    struct
      {
-        struct wl_resource *resource;
-        uint32_t edges;
-     } resize;
+        E_DEPRECATED struct wl_resource *resource;
+        E_DEPRECATED uint32_t edges;
+     } E_DEPRECATED resize;
 
    struct
      {