subsurface: fix mistake caused by previous patch. 90/246490/1
authorSeunghun Lee <shiin.lee@samsung.com>
Fri, 30 Oct 2020 02:19:54 +0000 (11:19 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Fri, 30 Oct 2020 03:42:14 +0000 (12:42 +0900)
It has to raise a protocol error to sub-surface, not its sibling surface.

Change-Id: I6bbe55801807fd1a35eb45d17ff9910e87086c14

src/bin/e_comp_wl_subsurface.c

index 05430f0..ac3abdc 100644 (file)
@@ -676,7 +676,7 @@ _e_comp_wl_subsurface_cb_place_above(struct wl_client *client EINA_UNUSED, struc
 
    if (!_subsurface_sibling_check(ec, ecs))
      {
-        wl_resource_post_error(ecs_cdata->sub.data->resource,
+        wl_resource_post_error(cdata->sub.data->resource,
                                WL_SUBSURFACE_ERROR_BAD_SURFACE,
                                "%s: wl_surface@%d is not a parent or sibling",
                                "place_above", wl_resource_get_id(ecs_cdata->surface));
@@ -721,12 +721,10 @@ _e_comp_wl_subsurface_cb_place_below(struct wl_client *client EINA_UNUSED, struc
    if (!(ecs = wl_resource_get_user_data(sibling_resource))) return;
    ecs_cdata = e_client_cdata_get(ecs);
    if (!ecs_cdata) return;
-   if (!ecs_cdata->sub.data) return;
-
 
    if (!_subsurface_sibling_check(ec, ecs))
      {
-        wl_resource_post_error(ecs_cdata->sub.data->resource,
+        wl_resource_post_error(cdata->sub.data->resource,
                                WL_SUBSURFACE_ERROR_BAD_SURFACE,
                                "%s: wl_surface@%d is not a parent or sibling",
                                "place_below", wl_resource_get_id(ecs_cdata->surface));