send a release key when a surface (has received the press of the same key) is destroyed. 77/133477/2
authorJengHyun Kang <jhyuni.kang@samsung.com>
Mon, 12 Jun 2017 10:46:29 +0000 (19:46 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Mon, 12 Jun 2017 11:23:05 +0000 (11:23 +0000)
Change-Id: I8059aaf05d37a3d1bd90c8f5a8aca3bcdc754a0d

src/e_mod_keyrouter_events.c
src/e_mod_keyrouter_list.c

index 4341912..b80e60d 100644 (file)
@@ -155,14 +155,23 @@ _e_keyrouter_send_key_events_release(int type, Ecore_Event_Key *ev)
           }
         else
           {
-             if (key_node_data->focused == EINA_TRUE) res = EINA_FALSE;
+             if (key_node_data->focused == EINA_TRUE)
+               {
+                  res = EINA_FALSE;
+                  if (key_node_data->status == E_KRT_CSTAT_DEAD)
+                    {
+                       ev->data = key_node_data->wc;
+                    }
+                  else
+                    {
+                       ev->data = (void *)0x1;
+                    }
+               }
              KLINF("Release Pair : %s(%s:%d)(Focus: %d)(Status: %d) => wl_surface (%p) wl_client (%p) process is ungrabbed / dead",
                       ((ECORE_EVENT_KEY_DOWN == type) ? "Down" : "Up"), ev->keyname, ev->keycode, key_node_data->focused,
                       key_node_data->status, key_node_data->surface, key_node_data->wc);
           }
 
-        if (key_node_data->focused && key_node_data->status != E_KRT_CSTAT_ALIVE) ev->data = (void *)0x1;
-
         E_FREE(key_node_data);
         if (res == EINA_FALSE) ret = EINA_FALSE;
      }
index a48f175..81c8cf1 100644 (file)
@@ -359,6 +359,7 @@ e_keyrouter_remove_client_from_list(struct wl_resource *surface, struct wl_clien
                     {
                        key_node_data->status = E_KRT_CSTAT_DEAD;
                        KLDBG("Remove a Pressed  key(%d) by wl_surface(%p)", i, surface);
+                       key_node_data->wc = wl_resource_get_client(surface);
                     }
                }
              else if ((wc == key_node_data->wc))