e_comp_wl_input: fix crash issue due to no wl_keyboard_interface 50/310450/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 29 Apr 2024 08:21:13 +0000 (17:21 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 29 Apr 2024 08:39:03 +0000 (17:39 +0900)
Change-Id: I96be00cbaabb6d27f791912f9445db6f554b1a4e
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/bin/e_comp_wl_input.c

index b9d3fb0843e78f953956b63c047561a81fd19b07..637e19fbe0eb7d6e51c5cc7e9fd4e2ff88272e2a 100644 (file)
@@ -412,10 +412,6 @@ _e_comp_wl_input_thread_cb_keyboard_get(void *data)
    e_comp_input_key->kbd.resources =
      eina_list_append(e_comp_input_key->kbd.resources, res);
 
-   wl_resource_set_implementation(res, &_e_keyboard_interface,
-                                  e_comp->wl_comp_data,
-                                  _e_comp_wl_input_cb_keyboard_unbind);
-
    /* send current repeat_info */
    if (wl_resource_get_version(res) >= WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION)
      {
@@ -453,6 +449,10 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r
         return;
      }
 
+   wl_resource_set_implementation(res, &_e_keyboard_interface,
+                                  e_comp->wl_comp_data,
+                                  _e_comp_wl_input_cb_keyboard_unbind);
+
    /* send current keymap */
    TRACE_INPUT_BEGIN(wl_keyboard_send_keymap);
    wl_keyboard_send_keymap(res, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,