static E_Policy_Wl *polwl = NULL;
static Eina_List *handlers = NULL;
+static Eina_List *polwl_hooks_ec = NULL;
static Eina_List *hooks_cw = NULL;
static Eina_List *hooks_co = NULL;
static struct wl_resource *_scrsaver_mng_res = NULL; // TODO
}
}
+static void
+_e_policy_wl_client_cb_resize_end(void *data EINA_UNUSED, E_Client *ec)
+{
+ int x, y, w, h;
+
+ if (e_object_is_del(E_OBJECT(ec))) return;
+ if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
+
+ if (ec->manage_resize.resize_obj)
+ {
+ x = ec->manage_resize.x;
+ y = ec->manage_resize.y;
+ w = ec->manage_resize.w;
+ h = ec->manage_resize.h;
+ }
+ else
+ {
+ x = ec->x;
+ y = ec->y;
+ w = ec->w;
+ h = ec->h;
+ e_client_geometry_get(ec, &x, &y, &w, &h);
+ }
+
+ E_Policy_Wl_Tzpol *tzpol;
+ E_Policy_Wl_Surface *psurf;
+ Eina_List *l;
+ Eina_Iterator *it;
+ int ver = -1;
+
+ it = eina_hash_iterator_data_new(polwl->tzpols);
+ EINA_ITERATOR_FOREACH(it, tzpol)
+ {
+ EINA_LIST_FOREACH(tzpol->psurfs, l, psurf)
+ {
+ if (e_pixmap_client_get(psurf->cp) != ec) continue;
+ if (!psurf->surf) continue;
+
+ ver = wl_resource_get_version(tzpol->res_tzpol);
+ if (ver < 10)
+ {
+ // interactive_resize_done event is supported since ver 10
+ continue;
+ }
+
+ tizen_policy_send_interactive_resize_done(tzpol->res_tzpol,
+ psurf->surf, x, y, w, h,
+ ec->e.state.rot.ang.curr);
+ }
+ }
+ eina_iterator_free(it);
+}
+
+static void
+_e_policy_wl_client_cb_move_end(void *data EINA_UNUSED, E_Client *ec)
+{
+ if (e_object_is_del(E_OBJECT(ec))) return;
+ if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
+
+ int x, y, w, h;
+ x = ec->x;
+ y = ec->y;
+ w = ec->w;
+ h = ec->h;
+ e_client_geometry_get(ec, &x, &y, &w, &h);
+
+ E_Policy_Wl_Tzpol *tzpol;
+ E_Policy_Wl_Surface *psurf;
+ Eina_List *l;
+ Eina_Iterator *it;
+ int ver = -1;
+
+ it = eina_hash_iterator_data_new(polwl->tzpols);
+ EINA_ITERATOR_FOREACH(it, tzpol)
+ {
+ EINA_LIST_FOREACH(tzpol->psurfs, l, psurf)
+ {
+ if (e_pixmap_client_get(psurf->cp) != ec) continue;
+ if (!psurf->surf) continue;
+
+ ver = wl_resource_get_version(tzpol->res_tzpol);
+ if (ver < 10)
+ {
+ // interactive_move_done event is supported since ver 10
+ continue;
+ }
+
+ tizen_policy_send_interactive_move_done(tzpol->res_tzpol,
+ psurf->surf,
+ x, y, w, h,
+ ec->e.state.rot.ang.curr);
+ }
+ }
+ eina_iterator_free(it);
+}
+
void
e_policy_wl_generate_request(E_Client *ec, E_Policy_Wl_Gen_Request type)
{
/* create globals */
global = wl_global_create(e_comp_wl->wl.disp,
&tizen_policy_interface,
- 9,
+ 10,
NULL,
_tzpol_cb_bind);
EINA_SAFETY_ON_NULL_GOTO(global, err);
E_COMP_WL_HOOK_APPEND(hooks_cw, E_COMP_WL_HOOK_SHELL_SURFACE_READY, _e_policy_wl_cb_hook_shell_surface_ready, NULL);
E_COMP_WL_HOOK_APPEND(hooks_cw, E_COMP_WL_HOOK_CLIENT_ALPHA_CHANGE, _e_policy_wl_cb_hook_alpha_change, NULL);
+ E_LIST_HOOK_APPEND(polwl_hooks_ec, E_CLIENT_HOOK_RESIZE_END, _e_policy_wl_client_cb_resize_end, NULL);
+ E_LIST_HOOK_APPEND(polwl_hooks_ec, E_CLIENT_HOOK_MOVE_END, _e_policy_wl_client_cb_move_end, NULL);
+
E_EVENT_POLICY_INDICATOR_STATE_CHANGE = ecore_event_type_new();
E_EVENT_POLICY_INDICATOR_OPACITY_MODE_CHANGE = ecore_event_type_new();
E_EVENT_POLICY_INDICATOR_VISIBLE_STATE_CHANGE = ecore_event_type_new();
EINA_SAFETY_ON_NULL_RETURN(polwl);
+ E_FREE_LIST(polwl_hooks_ec, e_client_hook_del);
E_FREE_LIST(hooks_cw, e_comp_wl_hook_del);
E_FREE_LIST(hooks_co, e_comp_object_intercept_hook_del);
E_FREE_LIST(handlers, ecore_event_handler_del);