Eina_Bool panel;
Eina_Bool showing;
Eina_Bool need_show;
+
+ E_Client_Hook *hook_del;
};
struct _E_Input_Panel_Floating_Info
} start_position;
};
-E_Input_Panel *g_input_panel = NULL;
-E_Input_Panel_Floating_Info *g_floating_info = NULL;
+static E_Input_Panel *g_input_panel = NULL;
+static E_Input_Panel_Floating_Info *g_floating_info = NULL;
static Eina_Bool use_main_ec_for_position_set = EINA_FALSE;
-Eina_List *handlers = NULL;
static Eina_Bool panel_show_need_rerun = EINA_FALSE;
static Ecore_Timer *g_timer_wait_update = NULL;
if (!(input_panel = ips->input_panel)) return;
ec = ips->ec;
- if (ec)
+ if (ec && (!e_object_is_del(E_OBJECT(ec))))
{
- if (e_object_is_del(E_OBJECT(ec))) return;
-
if (ec->comp_data)
{
if (ec->comp_data->mapped)
input_panel->surfaces = eina_list_remove(input_panel->surfaces, ips);
E_FREE_FUNC(ips->eh.rot_change_end, ecore_event_handler_del);
E_FREE_FUNC(ips->eh.buf_change, ecore_event_handler_del);
+ E_FREE_FUNC(ips->hook_del, e_client_hook_del);
free(ips);
}
return ECORE_CALLBACK_PASS_ON;
}
+static void
+_e_input_panel_client_cb_remove(void *data, E_Client *ec)
+{
+ E_Input_Panel_Surface *ips = data;
+
+ if (ec == ips->ec)
+ {
+ LOGD("Remove IPS's ec. ips:%p, ips->ec:%p", ips, ips->ec);
+ ips->ec = NULL;
+ }
+}
+
static void
_e_ips_cb_evas_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
ips->ec = ec;
ips->input_panel = input_panel;
+ LOGD("Create IPS.. ips:%p, input_panel:%p, ec:%p", ips, input_panel, ec);
+
_e_input_panel_surface_append(input_panel, ips, resource);
wl_resource_set_implementation(cdata->shell.surface,
ips->eh.rot_change_end =
ecore_event_handler_add(E_EVENT_CLIENT_ROTATION_CHANGE_END,
_e_input_panel_client_cb_rotation_change_end, ips);
+
+ ips->hook_del = e_client_hook_add(E_CLIENT_HOOK_DEL, _e_input_panel_client_cb_remove, ips);
}