e_comp_wl: make kbd_resources_get/lock/unlock funcs work on current seat 59/325059/1
authorduna.oh <duna.oh@samsung.com>
Fri, 30 May 2025 07:55:41 +0000 (16:55 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 2 Jun 2025 06:50:36 +0000 (15:50 +0900)
Also put TODO labels on the following E_APIs.

e_comp_wl_input_kbd_resources_get
e_comp_wl_input_kbd_resource_list_lock
e_comp_wl_input_kbd_resource_list_unlock

Change-Id: Iefabd2492a4b8001ed3d081f868e46fc739f8439

src/bin/server/e_comp_wl_input.c

index 83db2e3f89c727a4c23ee0ef1d76c9737ff1dade..44ddfa4d96cb9c4531cb898b8233ba8c93dc6428 100644 (file)
@@ -1794,13 +1794,15 @@ e_comp_wl_input_xkb_keymap_get()
    return e_comp_input_key->xkb.keymap;
 }
 
+//TODO: deprecate thie API
 E_API const Eina_List *
 e_comp_wl_input_kbd_resources_get()
 {
-   EINA_SAFETY_ON_FALSE_RETURN_VAL(e_comp_input_key, NULL);
-   //TODO:
-   //return e_comp_input_key->kbd.resources;
-   return NULL;
+   E_Seat *seat;
+
+   seat = e_seat_current_get();
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(seat, NULL);
+   return e_seat_keyboard_resources_get(seat);
 }
 
 E_API int
@@ -1817,18 +1819,24 @@ e_comp_wl_input_kbd_repeat_rate_get()
    return e_comp_input_key->kbd.repeat_rate;
 }
 
+//TODO: deprecate thie API
 E_API void
 e_comp_wl_input_kbd_resource_list_lock()
 {
-  EINA_SAFETY_ON_NULL_RETURN(e_comp_input_key);
-  //TODO:
-  //g_rec_mutex_lock(&e_comp_input_key->kbd.resources_mutex);
+   E_Seat *seat;
+
+   seat = e_seat_current_get();
+   EINA_SAFETY_ON_FALSE_RETURN(seat);
+   e_seat_keyboard_resources_lock(seat);
 }
 
+//TODO: deprecate thie API
 E_API void
 e_comp_wl_input_kbd_resource_list_unlock()
 {
-  EINA_SAFETY_ON_NULL_RETURN(e_comp_input_key);
-  //TODO:
-  //g_rec_mutex_unlock(&e_comp_input_key->kbd.resources_mutex);
+   E_Seat *seat;
+
+   seat = e_seat_current_get();
+   EINA_SAFETY_ON_NULL_RETURN(seat);
+   e_seat_keyboard_resources_unlock(seat);
 }