}
static void
-_e_client_base_output_resolution_hook_subsurf_create(void *data, E_Client *ec)
+_e_client_base_output_resolution_hook_subsurf_create(void *data, E_Client *subc)
{
- E_Client *parent;
+ E_Client *ec, *parent;
- if (!ec->base_output_resolution.hook_subsurf_create)
+ ec = data;
+ if (ec != subc)
return;
ec->base_output_resolution.use = 0;
ec->base_output_resolution.w = 0;
ec->base_output_resolution.h = 0;
- e_client_transform_core_remove(ec, ec->base_output_resolution.transform);
- E_FREE_FUNC(ec->base_output_resolution.transform, e_util_transform_del);
- E_FREE_FUNC(ec->base_output_resolution.hook_subsurf_create, e_comp_wl_hook_del);
-
- ELOGF("POL_APPINFO", "Cancel TRANSFORM for subsurface", ec);
+ if (ec->base_output_resolution.transform)
+ {
+ e_client_transform_core_remove(ec, ec->base_output_resolution.transform);
+ E_FREE_FUNC(ec->base_output_resolution.transform, e_util_transform_del);
+ ELOGF("POL_APPINFO", "Cancel TRANSFORM for subsurface", ec);
+ }
/* Update transform for toplevel surface.
* The transform of subsurface will be updated by its parent accordingly. */
ec->base_output_resolution.hook_subsurf_create =
e_comp_wl_hook_add(E_COMP_WL_HOOK_SUBSURFACE_CREATE,
_e_client_base_output_resolution_hook_subsurf_create,
- NULL);
+ ec);
}
}