| Index: ui/ozone/platform/wayland/wayland_connection.cc
|
| diff --git a/ui/ozone/platform/wayland/wayland_connection.cc b/ui/ozone/platform/wayland/wayland_connection.cc
|
| index 520b21f9f08a62f6b17332484c7e0d6a58a115db..6db7a8f67910b2cb4c3565208a6684452b63181f 100644
|
| --- a/ui/ozone/platform/wayland/wayland_connection.cc
|
| +++ b/ui/ozone/platform/wayland/wayland_connection.cc
|
| @@ -227,6 +227,20 @@ void WaylandConnection::Capabilities(void* data,
|
| } else if (connection->pointer_) {
|
| connection->pointer_.reset();
|
| }
|
| + if (capabilities & WL_SEAT_CAPABILITY_KEYBOARD) {
|
| + if (!connection->keyboard_) {
|
| + wl_keyboard* keyboard = wl_seat_get_keyboard(connection->seat_.get());
|
| + if (!keyboard) {
|
| + LOG(ERROR) << "Failed to get wl_keyboard from seat";
|
| + return;
|
| + }
|
| + connection->keyboard_ = base::MakeUnique<WaylandKeyboard>(
|
| + keyboard, base::Bind(&WaylandConnection::DispatchUiEvent,
|
| + base::Unretained(connection)));
|
| + }
|
| + } else if (connection->keyboard_) {
|
| + connection->keyboard_.reset();
|
| + }
|
| connection->ScheduleFlush();
|
| }
|
|
|
|
|