e_policy_wl: Do nothing with a subsurface for fake 02/296702/2 accepted/tizen/unified/20230803.174836
authorSeunghun Lee <shiin.lee@samsung.com>
Thu, 3 Aug 2023 07:18:43 +0000 (16:18 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Thu, 3 Aug 2023 07:46:22 +0000 (07:46 +0000)
This fixes abort() in ds_subsurface_from_resource().

Change-Id: I779ec93fa92ebce1352437992663da154559c103

src/bin/e_policy_wl.c

index 7026d3d9fc3e413dcec04a6112830b3c4d978950..7ebd59be0a03de974499cee908716fb9bbc165fe 100644 (file)
@@ -2153,15 +2153,24 @@ e_policy_wl_win_scrmode_apply(void)
 // --------------------------------------------------------
 // subsurface
 // --------------------------------------------------------
+
+static const struct wl_subsurface_interface _tzpol_subsurface_fake_impl;
+
 static void
 _tzpol_iface_cb_subsurf_place_below_parent(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *subsurf)
 {
+   if (wl_resource_instance_of(subsurf, &wl_subsurface_interface, &_tzpol_subsurface_fake_impl))
+     return;
+
    e_comp_wl_subsurface_resource_place_below_parent(subsurf);
 }
 
 static void
 _tzpol_iface_cb_subsurf_stand_alone_set(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *subsurf)
 {
+   if (wl_resource_instance_of(subsurf, &wl_subsurface_interface, &_tzpol_subsurface_fake_impl))
+     return;
+
    e_comp_wl_subsurface_resource_stand_alone_mode_set(subsurf);
 }