modify code to check zone's display state before handling hide input_panel 89/140289/2
authorDoyoun Kang <doyoun.kang@samsung.com>
Mon, 24 Jul 2017 10:21:47 +0000 (19:21 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Mon, 24 Jul 2017 10:38:53 +0000 (19:38 +0900)
Input panel window will hide immediately when the zone's display state is E_ZONE_DISPLAY_STATE_OFF not using timer.

Change-Id: Ib09b748be182a2eb66397d6a84db72b22a7a47bd

src/e_mod_main.c

index e7cfa3f..76155e5 100644 (file)
@@ -237,6 +237,8 @@ _input_panel_hide(struct wl_client *client, struct wl_resource *resource, Eina_B
    E_Text_Input *text_input = wl_resource_get_user_data(resource);
    E_Input_Method *input_method = NULL;
    Eina_Bool _context_created = EINA_FALSE;
+   E_Zone *zone = NULL;
+   double timeout;
 
    if (!text_input)
      {
@@ -272,7 +274,13 @@ _input_panel_hide(struct wl_client *client, struct wl_resource *resource, Eina_B
              ecore_timer_del(g_timer_will_hide);
              g_timer_will_hide = NULL;
           }
-        g_timer_will_hide = ecore_timer_add(WILL_HIDE_TIMER_INTERVAL, _will_hide_timer_handler, NULL);
+
+        zone = e_zone_current_get();
+        if (zone && (zone->display_state == E_ZONE_DISPLAY_STATE_OFF))
+          timeout = 0.0f;
+        else
+          timeout = WILL_HIDE_TIMER_INTERVAL;
+        g_timer_will_hide = ecore_timer_add(timeout, _will_hide_timer_handler, NULL);
      }
 
    if (g_input_method && g_input_method->resource)