seat: fix the typo. should handle a proper device type 91/278191/1
authorduna.oh <duna.oh@samsung.com>
Wed, 18 May 2022 09:37:26 +0000 (18:37 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 18 Jul 2022 05:58:39 +0000 (14:58 +0900)
Change-Id: Ifd7196e8f2a803973e1083b3baba7cff07428b20

src/libds/seat/seat.c
src/libds/seat/seat_touch.c

index 542186e..51d5c23 100644 (file)
@@ -201,10 +201,10 @@ seat_handle_get_keyboard(struct wl_client *wl_client,
         return;
 
     if (!(seat_client->seat->accumulated_capabilities &
-                WL_SEAT_CAPABILITY_POINTER)) {
+                WL_SEAT_CAPABILITY_KEYBOARD)) {
 #ifdef HAVE_WL_SEAT_ERROR_MISSING_CAPABILITY
         wl_resource_post_error(resource, WL_SEAT_ERROR_MISSING_CAPABILITY,
-                "wl_seat.get_pointer called when no "
+                "wl_seat.get_keyboard called when no "
                 "keyboard capability has existed");
 #endif
         return;
@@ -225,10 +225,10 @@ seat_handle_get_touch(struct wl_client *wl_client,
         return;
 
     if (!(seat_client->seat->accumulated_capabilities &
-                WL_SEAT_CAPABILITY_POINTER)) {
+                WL_SEAT_CAPABILITY_TOUCH)) {
 #ifdef HAVE_WL_SEAT_ERROR_MISSING_CAPABILITY
         wl_resource_post_error(resource, WL_SEAT_ERROR_MISSING_CAPABILITY,
-                "wl_seat.get_pointer called when no "
+                "wl_seat.get_touch called when no "
                 "touch capability has existed");
 #endif
         return;
index 8a02e94..476c6a8 100644 (file)
@@ -233,7 +233,7 @@ seat_client_add_touch_resource(struct ds_seat_client *seat_client,
     struct wl_resource *resource;
 
     resource = wl_resource_create(seat_client->wl_client,
-            &wl_keyboard_interface, version, id);
+            &wl_touch_interface, version, id);
     if (!resource) {
         wl_client_post_no_memory(seat_client->wl_client);
         return;