Hide input panel on transient_for eclient deletion 04/91004/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Wed, 5 Oct 2016 09:24:42 +0000 (18:24 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Wed, 5 Oct 2016 09:26:35 +0000 (18:26 +0900)
Change-Id: I9004ee89a4acf4285ddec82db0d5d1eb30d3ce0e

src/e_mod_main.c

index 4fc2a11e3fc048ebbfd05a8a2e1a67088c461f5b..4027143549deae59612cbc983cfe67ac316d1af9 100644 (file)
@@ -137,6 +137,7 @@ _will_hide_timer_handler(void *data)
    if (g_input_panel_state == E_INPUT_PANEL_STATE_WILL_HIDE)
      {
         e_input_panel_visibility_change(EINA_FALSE);
+        g_input_panel_state = E_INPUT_PANEL_STATE_DID_HIDE;
      }
 
    if (g_timer_will_hide)
@@ -1457,6 +1458,7 @@ _e_text_input_cb_input_panel_data_set(struct wl_client *client EINA_UNUSED, stru
         if (g_input_panel_state == E_INPUT_PANEL_STATE_WILL_HIDE)
           {
              e_input_panel_visibility_change(EINA_FALSE);
+             g_input_panel_state = E_INPUT_PANEL_STATE_DID_HIDE;
           }
      }
 }
@@ -1919,6 +1921,17 @@ _pol_cb_hook_client_del(void *d EINA_UNUSED, E_Client *ec)
 
    if (ec == transient_for_ec)
      {
+        if (g_input_panel_state == E_INPUT_PANEL_STATE_WILL_HIDE)
+          {
+             WTI_LOG("transient_for_ec deleted while waiting for will_hide_ack, hiding input panel\n");
+             e_input_panel_visibility_change(EINA_FALSE);
+             g_input_panel_state = E_INPUT_PANEL_STATE_DID_HIDE;
+             if (g_timer_will_hide)
+               {
+                  ecore_timer_del(g_timer_will_hide);
+                  g_timer_will_hide = NULL;
+               }
+          }
         transient_for_ec = NULL;
         WTI_LOG("TRANSIENT_FOR::Reset transient_for_ec to NULL\n");
      }