ecore_wayland: Change keyevent handler to pass event even though window is not exist 02/48002/2 tizen_3.0.m1_mobile tizen_3.0.m1_tv accepted/tizen/mobile/20150911.145209 accepted/tizen/tv/20150911.145222 accepted/tizen/wearable/20150911.145231 submit/accepted/tizen_mobile/20150911.023538 submit/tizen/20150911.051348 submit/tizen_common/20151023.083358 submit/tizen_common/20151026.085049 tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release
authorJi-Youn Park <jy0703.park@samsung.com>
Fri, 11 Sep 2015 01:37:19 +0000 (10:07 +0830)
committerJi-Youn Park <jy0703.park@samsung.com>
Fri, 11 Sep 2015 01:42:14 +0000 (10:12 +0830)
@tizen_feature

Change-Id: I87bb2ca85b9e743a3cf976c597f15819f07f5bd4

src/lib/ecore_wayland/ecore_wl_input.c

index 7e47796..4dfda05 100644 (file)
@@ -768,6 +768,7 @@ _ecore_wl_input_cb_keyboard_key(void *data, struct wl_keyboard *keyboard EINA_UN
 
    /* xkb rules reflect X broken keycodes, so offset by 8 */
    code = keycode + 8;
+   INF("Key[%d] event occurs", code);
 
    if (!win)
      {
@@ -782,8 +783,7 @@ _ecore_wl_input_cb_keyboard_key(void *data, struct wl_keyboard *keyboard EINA_UN
           {
              //key event callback can be called even though surface is not exist.
              //TODO: Ecore_Event_Key have event_window info, so if (surface == NULL), we should generate proper window info
-             WRN("surface is not exist");
-             return;
+             INF("surface is not exist");
           }
      }
    else
@@ -844,8 +844,20 @@ _ecore_wl_input_cb_keyboard_key(void *data, struct wl_keyboard *keyboard EINA_UN
    strcpy((char *)e->key, key);
    if (strlen(compose)) strcpy((char *)e->compose, compose);
 
-   e->window = win->id;
-   e->event_window = win->id;
+   // TIZEN_ONLY(20150911): Deal with key event if window is not exist.
+   if (win)
+     {
+   //
+        e->window = win->id;
+        e->event_window = win->id;
+   // TIZEN_ONLY(20150911): Deal with key event if window is not exist.
+     }
+   else
+     {
+        e->window = NULL;
+        e->event_window = NULL;
+     }
+   //
    e->timestamp = timestamp;
    e->modifiers = input->modifiers;