diff --git a/src/wayland/meta-wayland-seat.c b/src/wayland/meta-wayland-seat.c index 165b7656b..ec1c0bb60 100644 --- a/src/wayland/meta-wayland-seat.c +++ b/src/wayland/meta-wayland-seat.c @@ -445,3 +445,21 @@ meta_wayland_seat_can_popup (MetaWaylandSeat *seat, meta_wayland_keyboard_can_popup (seat->keyboard, serial) || meta_wayland_touch_can_popup (seat->touch, serial)); } + +gboolean +meta_wayland_seat_has_keyboard (MetaWaylandSeat *seat) +{ + return (seat->capabilities & WL_SEAT_CAPABILITY_KEYBOARD) != 0; +} + +gboolean +meta_wayland_seat_has_pointer (MetaWaylandSeat *seat) +{ + return (seat->capabilities & WL_SEAT_CAPABILITY_POINTER) != 0; +} + +gboolean +meta_wayland_seat_has_touch (MetaWaylandSeat *seat) +{ + return (seat->capabilities & WL_SEAT_CAPABILITY_TOUCH) != 0; +} diff --git a/src/wayland/meta-wayland-seat.h b/src/wayland/meta-wayland-seat.h index 33b8975c5..1b3cd8acd 100644 --- a/src/wayland/meta-wayland-seat.h +++ b/src/wayland/meta-wayland-seat.h @@ -69,4 +69,10 @@ gboolean meta_wayland_seat_get_grab_info (MetaWaylandSeat *seat, gboolean meta_wayland_seat_can_popup (MetaWaylandSeat *seat, uint32_t serial); +gboolean meta_wayland_seat_has_keyboard (MetaWaylandSeat *seat); + +gboolean meta_wayland_seat_has_pointer (MetaWaylandSeat *seat); + +gboolean meta_wayland_seat_has_touch (MetaWaylandSeat *seat); + #endif /* META_WAYLAND_SEAT_H */