static Eina_Bool _custom_conformant_event = EINA_FALSE;
static Eina_Bool _received_will_hide_event = EINA_FALSE;
static Eina_Bool _conformant_reset_done = EINA_FALSE;
+static Eina_Bool _conformant_reset_started = EINA_FALSE;
static Evas *_active_context_canvas = NULL;
static unsigned int _active_context_window_id = 0;
ev->state = 0;
ecore_event_add(ECORE_WL_EVENT_CONFORMANT_CHANGE, ev, NULL, NULL);
}
+
+ _conformant_reset_started = EINA_TRUE;
}
return reset;
ev->state = 0;
ecore_event_add(ECORE_WL_EVENT_CONFORMANT_CHANGE, ev, NULL, NULL);
}
+ _conformant_reset_started = EINA_FALSE;
}
}
Ecore_IMF_Context *ctx = (Ecore_IMF_Context *)data;
_send_input_panel_hide_request(ctx);
- if (!reset_conformant_area(ctx)) {
+ if (!reset_conformant_area(ctx) && !_conformant_reset_started) {
LOGD("No need to reset conformant, sending ACK right away");
_send_will_hide_ack((WaylandIMContext *)ecore_imf_context_data_get(ctx));
}
if (!ctx) return;
will_hide = EINA_TRUE;
+ _conformant_reset_started = EINA_FALSE;
if (instant || (_hide_timer && ecore_timer_pending_get(_hide_timer) <= 0.0)) {
_clear_hide_timer();
_send_input_panel_hide_request(ctx);
- if (!reset_conformant_area(ctx)) {
+ if (!reset_conformant_area(ctx) && !_conformant_reset_started) {
LOGD("No need to reset conformant, sending ACK right away");
_send_will_hide_ack((WaylandIMContext *)ecore_imf_context_data_get(ctx));
}
{
void *callback = evas_event_callback_del(e, EVAS_CALLBACK_RENDER_POST, _render_post_cb);
_conformant_reset_done = EINA_TRUE;
+ _conformant_reset_started = EINA_FALSE;
LOGD("[_render_post_cb], _conformant_reset_done = 1 , %p\n", callback);
send_will_hide_ack(NULL);
}
LOGD("_conformant_reset_done = 0, registering _render_post_cb : %p %p\n", _active_context_canvas, window);
_conformant_reset_done = EINA_FALSE;
if (_active_context_canvas && ecore_wl_window_conformant_get(window) && !_custom_conformant_event) {
+ evas_event_callback_del(_active_context_canvas, EVAS_CALLBACK_RENDER_POST, _render_post_cb);
evas_event_callback_add(_active_context_canvas, EVAS_CALLBACK_RENDER_POST, _render_post_cb, ctx);
}
} else {
Ecore_Wl_Window *window = imcontext->window;
if (!window) return;
- if (!reset_conformant_area(imcontext->ctx)) {
+ if (!reset_conformant_area(imcontext->ctx) && !_conformant_reset_started) {
+ LOGD("Could not reset conformant area, send will_hide_ack right away %d", _conformant_reset_started);
+ _send_will_hide_ack(imcontext);
+ } else if (_conformant_reset_done) {
+ LOGD("Conformant reset has been already finished, send will_hide_ack right away");
_send_will_hide_ack(imcontext);
}
} else if (strncmp(command, szConformantRestore, strlen(szConformantRestore)) == 0) {