Ecore_Event_Handler *rot_change_end;
Ecore_Event_Handler *buf_change;
Ecore_Event_Handler *rot_geometry_set;
+ Ecore_Event_Handler *visibility_change;
} eh;
Eina_Bool panel;
LOGI("Removing ips %p from input panel %p", ips, input_panel);
input_panel->surfaces = eina_list_remove(input_panel->surfaces, ips);
+
+ E_FREE_FUNC(ips->eh.visibility_change, ecore_event_handler_del);
E_FREE_FUNC(ips->eh.rot_geometry_set, ecore_event_handler_del);
E_FREE_FUNC(ips->eh.rot_change_end, ecore_event_handler_del);
E_FREE_FUNC(ips->eh.buf_change, ecore_event_handler_del);
return ECORE_CALLBACK_PASS_ON;
}
+static Eina_Bool
+_e_input_panel_client_cb_visibility_change(void *data, int type, void *event)
+{
+ E_Client *ec;
+ E_Input_Panel_Surface *ips = data;
+ E_Event_Client *ev = event;
+
+ if (!ips || !ev->ec)
+ goto end;
+
+ ec = ev->ec;
+ if (ec != ips->ec)
+ goto end;
+
+ if (!ips->showing)
+ goto end;
+
+ if (ips->resizing)
+ goto end;
+
+ if (ec->visibility.obscured == E_VISIBILITY_FULLY_OBSCURED)
+ e_input_panel_visibility_change(EINA_FALSE);
+
+end:
+ return ECORE_CALLBACK_PASS_ON;
+}
+
static void
_e_input_panel_client_cb_remove(void *data, E_Client *ec)
{
ecore_event_handler_add(E_EVENT_CLIENT_ROTATION_GEOMETRY_SET,
_e_input_panel_client_cb_rotation_geometry_set, ips);
+ ips->eh.visibility_change =
+ ecore_event_handler_add(E_EVENT_CLIENT_VISIBILITY_CHANGE,
+ _e_input_panel_client_cb_visibility_change, ips);
+
ips->hook_del = e_client_hook_add(E_CLIENT_HOOK_DEL, _e_input_panel_client_cb_remove, ips);
ips->hook_rotation_geometry_set = e_policy_hook_add(E_POLICY_HOOK_CLIENT_ROTATION_GEOMETRY_SET, _e_input_panel_rotation_geometry_set, ips);