e_comp_wl: Deprecate surface 89/325389/1
authorSeunghun Lee <shiin.lee@samsung.com>
Thu, 22 May 2025 01:41:36 +0000 (10:41 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Tue, 10 Jun 2025 02:33:43 +0000 (11:33 +0900)
The surface and wl_surface have been used interchangeably, leading to
potential confusion. This patch deprecates the use of surface and
replaces it with wl_surface for consistency and clarity.

Change-Id: I3d2132c3cb407df23349668bd14a30db7e1511ca

src/bin/debug/e_info_server.c
src/bin/server/e_comp_wl.c
src/bin/server/e_comp_wl_rsm.c
src/bin/server/e_compositor.c
src/bin/server/e_policy_wl.c
src/bin/server/e_tizen_clipboard.c
src/bin/server/e_tizen_indicator.c
src/bin/windowmgr/services/e_service_cbhm.c
src/bin/windowmgr/services/e_service_volume.c
src/include/e_comp_wl.h

index 8e2c7ecc06b328c03a5800b228f603756a6d4919..5cba50f3ba992d90990711106ab89b69120a2b5f 100644 (file)
@@ -441,8 +441,8 @@ _msg_ec_append(Eldbus_Message_Iter *struct_of_ec, E_Client *ec)
         if (ec->comp_data)
           {
              E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
-             if (cdata->surface)
-               wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+             if (cdata->wl_surface)
+               wl_client_get_credentials(wl_resource_get_client(cdata->wl_surface), &pid, NULL, NULL);
           }
      }
 
@@ -638,8 +638,8 @@ _msg_clients_append(Eldbus_Message_Iter *iter, Eina_Bool is_visible)
              if (ec->comp_data)
                {
                   E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
-                  if (cdata->surface)
-                    wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+                  if (cdata->wl_surface)
+                    wl_client_get_credentials(wl_resource_get_client(cdata->wl_surface), &pid, NULL, NULL);
                }
           }
 
@@ -1181,8 +1181,8 @@ _msg_connected_clients_append(Eldbus_Message_Iter *iter)
              if (ec->comp_data)
                {
                   E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
-                  if (cdata->surface)
-                    wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+                  if (cdata->wl_surface)
+                    wl_client_get_credentials(wl_resource_get_client(cdata->wl_surface), &pid, NULL, NULL);
                }
              if (cinfo->pid == pid)
                {
@@ -2295,8 +2295,8 @@ _get_win_prop_PID(const Evas_Object *evas_obj)
    if (ec->comp_data)
      {
         const E_Comp_Wl_Client_Data *cdata = (const E_Comp_Wl_Client_Data*)ec->comp_data;
-        if (cdata->surface)
-          wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+        if (cdata->wl_surface)
+          wl_client_get_credentials(wl_resource_get_client(cdata->wl_surface), &pid, NULL, NULL);
      }
 
    if (asprintf(&str, "%d", pid) < 0)
@@ -2726,9 +2726,9 @@ _msg_window_prop_append(const Eldbus_Message *msg, uint32_t mode, const char *va
              if (ec->comp_data)
                {
                   E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
-                  if (cdata->surface)
+                  if (cdata->wl_surface)
                     {
-                       wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+                       wl_client_get_credentials(wl_resource_get_client(cdata->wl_surface), &pid, NULL, NULL);
                     }
                }
              if (pid == value_number)
@@ -5537,8 +5537,8 @@ _e_info_server_ec_kill(uint32_t mode, void *value, Eldbus_Message_Iter *array_of
                   if (ec->comp_data)
                     {
                        E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
-                       if (cdata->surface)
-                       wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+                       if (cdata->wl_surface)
+                       wl_client_get_credentials(wl_resource_get_client(cdata->wl_surface), &pid, NULL, NULL);
                     }
                }
              if (pid != *(pid_t *)value)
@@ -5689,8 +5689,8 @@ _e_info_server_cb_get_windows(const Eldbus_Service_Interface *iface EINA_UNUSED,
                   if (ec->comp_data)
                     {
                        E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
-                       if (cdata->surface)
-                       wl_client_get_credentials(wl_resource_get_client(cdata->surface), &ec_pid, NULL, NULL);
+                       if (cdata->wl_surface)
+                       wl_client_get_credentials(wl_resource_get_client(cdata->wl_surface), &ec_pid, NULL, NULL);
                     }
                }
              if (ec_pid != pid)
@@ -5861,8 +5861,8 @@ _e_info_server_cb_wininfo(const Eldbus_Service_Interface *iface EINA_UNUSED, con
         if (ec->comp_data)
           {
              E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
-             if (cdata->surface)
-               wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+             if (cdata->wl_surface)
+               wl_client_get_credentials(wl_resource_get_client(cdata->wl_surface), &pid, NULL, NULL);
           }
      }
 
@@ -6655,8 +6655,8 @@ _msg_view_append(Eldbus_Message_Iter *iter, Eina_Bool is_visible)
              if (ec->comp_data)
                {
                   E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
-                  if (cdata->surface)
-                    wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+                  if (cdata->wl_surface)
+                    wl_client_get_credentials(wl_resource_get_client(cdata->wl_surface), &pid, NULL, NULL);
                }
           }
 
index 0b4e514ece9ba7c3ef1a74960da0d48e22483ec6..9261da4413709b3db73e3b8db0152d9cae4c4939 100644 (file)
@@ -3203,7 +3203,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
      _e_comp_wl_client_buffer_set(ec, state->buffer);
 
    /* emit a apply_viewport signal when the information of viewport and buffer is ready */
-   wl_signal_emit(&cdata->apply_viewport_signal, &cdata->surface);
+   wl_signal_emit(&cdata->apply_viewport_signal, &cdata->wl_surface);
 
    _e_comp_wl_surface_state_buffer_set(state, NULL);
 
@@ -3266,7 +3266,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
 
    e_comp_wl_subsurface_check_alpha_mask_rect(ec);
 
-   wl_signal_emit(&cdata->state_commit_signal, &cdata->surface);
+   wl_signal_emit(&cdata->state_commit_signal, &cdata->wl_surface);
 
    buffer = e_surface_buffer_try_get(surface);
    if ((buffer) && (e_policy_client_buffer_flush_enabled_get(ec)))
@@ -5953,7 +5953,7 @@ e_comp_wl_client_surface_get(E_Client *ec)
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, NULL);
 
    g_mutex_lock(&ec->comp_data->surface_mutex);
-   surface = ec->comp_data->surface;
+   surface = ec->comp_data->wl_surface;
    g_mutex_unlock(&ec->comp_data->surface_mutex);
 
    return surface;
@@ -5974,7 +5974,6 @@ EINTERN void e_comp_wl_client_surface_set(E_Client *ec, struct wl_resource *surf
    EINA_SAFETY_ON_NULL_RETURN(ec->comp_data);
 
    g_mutex_lock(&ec->comp_data->surface_mutex);
-   ec->comp_data->surface = surface;
    ec->comp_data->wl_surface = surface;
    g_mutex_unlock(&ec->comp_data->surface_mutex);
 
index 150155863b6324964e292b70eadbdb5a633227dc..4bbfa11e8fe6d439c9f0a28c278aba65f1bda900 100644 (file)
@@ -3059,7 +3059,7 @@ _e_comp_wl_remote_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *st
    state->sy = 0;
    state->new_attach = EINA_FALSE;
 
-   wl_signal_emit(&cdata->state_commit_signal, &cdata->surface);
+   wl_signal_emit(&cdata->state_commit_signal, &cdata->wl_surface);
 
    /* send remote buffer to remote surfaces */
    buffer = e_pixmap_resource_get(ec->pixmap);
index cc21c09bdc1f95fde3b1a48e363012a11b640c9a..a7245f487992acd3b497e835732f9f9a1ec9f094 100644 (file)
@@ -1004,7 +1004,7 @@ _e_surface_base_finish(E_Comp_Wl_Client_Data *base)
 {
    g_mutex_lock(&base->surface_mutex);
 
-   wl_signal_emit(&base->destroy_signal, &base->surface);
+   wl_signal_emit(&base->destroy_signal, &base->wl_surface);
 
    e_comp_wl_surface_state_finish(&base->pending);
 
@@ -1021,7 +1021,7 @@ _e_surface_base_finish(E_Comp_Wl_Client_Data *base)
           }
      }
 
-   if (e_comp_wl_get()->selection.cbhm == base->surface)
+   if (e_comp_wl_get()->selection.cbhm == base->wl_surface)
      e_comp_wl_get()->selection.cbhm = NULL;
 
    e_presentation_time_container_finish(&base->presentation_container);
index 44d238d31f45b043a60555784f44c56919d33264..e8e8f3e71f61c0783add78c04d51948c6e5f8c25 100644 (file)
@@ -355,8 +355,8 @@ _e_policy_wl_surf_add(E_Client *ec, struct wl_resource *res_tzpol)
    psurf->pid = ec->netwm.pid;
 
    cdata = e_client_cdata_get(ec);
-   if (wl_resource_get_client(cdata->surface) == wl_resource_get_client(res_tzpol))
-       psurf->surf = cdata->surface;
+   if (wl_resource_get_client(cdata->wl_surface) == wl_resource_get_client(res_tzpol))
+       psurf->surf = cdata->wl_surface;
 
    tzpol->psurfs = eina_list_append(tzpol->psurfs, psurf);
 
@@ -1204,7 +1204,7 @@ _tzpol_iface_cb_role_set(struct wl_client *client EINA_UNUSED, struct wl_resourc
         if (!cdata) return;
 
         comp_wl = e_comp_wl_get();
-        comp_wl->selection.cbhm = cdata->surface;
+        comp_wl->selection.cbhm = cdata->wl_surface;
      }
    else if (!e_util_strcmp("wl_pointer-cursor", role))
      {
@@ -1459,7 +1459,7 @@ _tzpol_iface_cb_transient_for_set(struct wl_client *client EINA_UNUSED, struct w
 
    ELOGF("TZPOL",
          "          |res_tzpol:%8p|parent_surf:%8p|child_surf:%8p",
-         NULL, res_tzpol, (p_cdata ? p_cdata->surface : NULL), (cdata ? cdata->surface : NULL));
+         NULL, res_tzpol, (p_cdata ? p_cdata->wl_surface : NULL), (cdata ? cdata->wl_surface : NULL));
 
    e_policy_stack_transient_for_set(ec, parent_ec);
    tizen_policy_send_transient_for_done(res_tzpol, child_id);
@@ -2543,7 +2543,7 @@ _tzpol_iface_cb_set_transient_for_below(struct wl_client *client EINA_UNUSED, st
    p_cdata = e_client_cdata_get(parent_ec);
    ELOGF("TZPOL",
          "          |res_tzpol:%8p|parent_surf:%8p|child_surf:%8p",
-         NULL, res_tzpol, (p_cdata ? p_cdata->surface : NULL), (cdata ? cdata->surface : NULL));
+         NULL, res_tzpol, (p_cdata ? p_cdata->wl_surface : NULL), (cdata ? cdata->wl_surface : NULL));
 
    e_policy_stack_transient_for_below_set(ec, parent_ec, EINA_TRUE);
 }
index 1b33b00d3d74926f45e7b894b02d28f3d4537087..727a15db73840cfa41bea42779012a6f947ca5cd 100644 (file)
@@ -196,9 +196,9 @@ _tz_clipboard_client_cb_data_only_set(struct wl_client *client, struct wl_resour
           {
              if (found) continue;
              cdata = e_client_cdata_get(ec);
-             if (cdata && cdata->surface)
+             if (cdata && cdata->wl_surface)
                {
-                  _wc = wl_resource_get_client(cdata->surface);
+                  _wc = wl_resource_get_client(cdata->wl_surface);
                   if (_wc == client)
                     found = ec;
                }
@@ -352,5 +352,5 @@ e_tizen_clipboard_data_selected_send(E_Client *ec)
    cdata = e_client_cdata_get(ec);
 
    tizen_clipboard_send_data_selected(tz_clipboard_client->res_tz_clipboard,
-                                      cdata ? cdata->surface : NULL);
+                                      cdata ? cdata->wl_surface : NULL);
 }
index 48d18e3c300e9422a2948aa214e617bedc0d7a48..6c8a28e4f9ea3e0efa54133e3fa7633c7147d4ff 100644 (file)
@@ -319,7 +319,7 @@ e_tizen_indicator_flick_send(E_Client *ec)
 
    cdata = e_client_cdata_get(ec);
    if (cdata)
-     surf = cdata->surface;
+     surf = cdata->wl_surface;
    else
      surf = NULL;
 
index 70f92ec1f50c68d9ff06e1c7303b59ea42899f06..db62062fa3712ef210bd1dcd7e7099d4a1bbae38 100644 (file)
@@ -235,7 +235,7 @@ e_service_cbhm_client_set(E_Client *ec)
 
    cdata = e_client_cdata_get(ec);
    comp_wl = e_comp_wl_get();
-   comp_wl->selection.cbhm = cdata->surface;
+   comp_wl->selection.cbhm = cdata->wl_surface;
    e_client_window_role_set(ec, "cbhm");
    e_policy_conformant_part_add(ec);
 
index a7b99d82dd569f419b4aba84df334a20a0441131..f55495b03811f91f83f90e29435666820560521a 100644 (file)
@@ -80,7 +80,7 @@ _volume_region_obj_cb_mouse_down(void *data EINA_UNUSED, Evas *evas EINA_UNUSED,
 
    serial = wl_display_next_serial(e_comp_wl_display_get());
    wl_touch_send_down(_volume_wl_touch, serial, e->timestamp,
-                      volume_cdata->surface, 0,
+                      volume_cdata->wl_surface, 0,
                       wl_fixed_from_int(e->canvas.x - _volume_ec->client.x),
                       wl_fixed_from_int(e->canvas.y - _volume_ec->client.y));
 }
@@ -108,7 +108,7 @@ _volume_region_obj_cb_multi_down(void *data EINA_UNUSED, Evas *evas EINA_UNUSED,
 
    serial = wl_display_next_serial(e_comp_wl_display_get());
    wl_touch_send_down(_volume_wl_touch, serial, e->timestamp,
-                      volume_cdata->surface, e->device,
+                      volume_cdata->wl_surface, e->device,
                       wl_fixed_from_int(e->canvas.x - _volume_ec->client.x),
                       wl_fixed_from_int(e->canvas.y - _volume_ec->client.y));
 }
@@ -481,7 +481,7 @@ _volume_wl_touch_resource_get(void)
 
    if (_volume_wl_touch) goto end;
 
-   wc = wl_resource_get_client(volume_cdata->surface);
+   wc = wl_resource_get_client(volume_cdata->wl_surface);
    EINA_LIST_FOREACH(e_seat_list_get(), l, seat)
      {
         EINA_LIST_FOREACH(e_seat_touch_resources_get(seat), ll, res)
index df0d3d1419f2abf553b8eb182b6f124a6485ff3c..9b6071fc9514721492e0412549148a91caf421f9 100644 (file)
@@ -405,8 +405,7 @@ struct _E_Comp_Wl_Client_Data
         Eina_Bool restacking : 1;
      } sub;
 
-   /* regular surface resource (wl_compositor_create_surface) */
-   struct wl_resource *surface;
+   E_DEPRECATED struct wl_resource *surface;
    struct wl_signal destroy_signal;
    struct wl_signal apply_viewport_signal;