return;
}
+ if (!ec->comp_data)
+ {
+ wl_resource_post_error(resource,
+ WL_DISPLAY_ERROR_INVALID_OBJECT,
+ "No Data For Client");
+ return;
+ }
+
// NOTE: we need to set mapped, so that avoid showing evas_object and continue buffer's commit process.
if ((!ec->comp_data->mapped) && (e_pixmap_usable_get(ec->pixmap)))
ec->comp_data->mapped = EINA_TRUE;
{
wl_resource_post_error(resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
- "No Client For Input Panel Surface");
+ "No Data For Client");
return;
}
E_Input_Panel *input_panel = data;
struct wl_resource *resource;
+ if (!input_panel) return;
+
resource = wl_resource_create(client, &wl_input_panel_interface, 1, id);
if (input_panel->resource == NULL)
void
e_input_panel_shutdown(E_Comp_Data *cdata EINA_UNUSED)
{
- if (g_input_panel->resource) wl_resource_destroy(g_input_panel->resource);
- if (g_input_panel->global) wl_global_destroy(g_input_panel->global);
+ if (g_input_panel)
+ {
+ if (g_input_panel->resource)
+ {
+ wl_resource_destroy(g_input_panel->resource);
+ g_input_panel->resource = NULL;
+ }
+
+ if (g_input_panel->global)
+ {
+ wl_global_destroy(g_input_panel->global);
+ g_input_panel->global = NULL;
+ }
+ }
}
text_input->input_methods = eina_list_remove(text_input->input_methods, input_method);
- wl_text_input_send_leave(text_input->resource);
+ if (text_input->resource)
+ wl_text_input_send_leave(text_input->resource);
}
}
if (text_input->input_panel_visibile)
e_input_panel_visibility_change(EINA_TRUE);
- wl_text_input_send_enter(text_input->resource, surface);
+ if (text_input->resource)
+ wl_text_input_send_enter(text_input->resource, surface);
return;
EINA_LIST_FOREACH(text_input->input_methods, l, input_method)
{
if (!input_method->context) continue;
- wl_input_method_context_send_reset(input_method->context->resource);
+ if (input_method->context->resource)
+ wl_input_method_context_send_reset(input_method->context->resource);
}
}
EINA_LIST_FOREACH(text_input->input_methods, l, input_method)
{
if (!input_method->context) continue;
- wl_input_method_context_send_surrounding_text(input_method->context->resource,
- text, cursor, anchor);
+ if (input_method->context->resource)
+ wl_input_method_context_send_surrounding_text(input_method->context->resource,
+ text, cursor, anchor);
}
}
EINA_LIST_FOREACH(text_input->input_methods, l, input_method)
{
if (!input_method->context) continue;
- wl_input_method_context_send_content_type(input_method->context->resource,
- hint, purpose);
+
+ if (input_method->context->resource)
+ wl_input_method_context_send_content_type(input_method->context->resource,
+ hint, purpose);
}
}
EINA_LIST_FOREACH(text_input->input_methods, l, input_method)
{
if (!input_method->context) continue;
- wl_input_method_context_send_preferred_language(input_method->context->resource,
- language);
+
+ if (input_method->context->resource)
+ wl_input_method_context_send_preferred_language(input_method->context->resource,
+ language);
}
}
EINA_LIST_FOREACH(text_input->input_methods, l, input_method)
{
if (!input_method->context) continue;
- wl_input_method_context_send_commit_state(input_method->context->resource, serial);
+
+ if (input_method->context->resource)
+ wl_input_method_context_send_commit_state(input_method->context->resource, serial);
}
}
EINA_LIST_FOREACH(text_input->input_methods, l, input_method)
{
if (!input_method->context) continue;
- wl_input_method_context_send_invoke_action(input_method->context->resource,
- button, index);
+
+ if (input_method->context->resource)
+ wl_input_method_context_send_invoke_action(input_method->context->resource,
+ button, index);
}
}
EINA_LIST_FREE(text_input->input_methods, input_method)
_e_text_input_deactivate(text_input, input_method);
- eina_rectangle_free(text_input->cursor_rect);
+ if (text_input->cursor_rect)
+ {
+ eina_rectangle_free(text_input->cursor_rect);
+ text_input->cursor_rect = NULL;
+ }
+
free(text_input);
}