Add simple keyboard handling for wayland.
This commit is contained in:
parent
e2cc98e1fb
commit
918c1d3046
8 changed files with 175 additions and 28 deletions
|
@ -18,8 +18,18 @@ void WaylandSeatInterface::onSeatCapabilitiesEvent(uint32_t capabilities)
|
|||
}
|
||||
else if (!have_pointer && mPointerInterface!= nullptr)
|
||||
{
|
||||
wl_pointer_release(mPointerInterface->getPointer());
|
||||
mPointerInterface.release();
|
||||
mPointerInterface.reset();
|
||||
}
|
||||
|
||||
const bool have_keyboard = capabilities & WL_SEAT_CAPABILITY_KEYBOARD;
|
||||
if (have_keyboard && mKeyboard == nullptr)
|
||||
{
|
||||
auto keyboard = wl_seat_get_keyboard(mSeat);
|
||||
mKeyboard = std::make_unique<WaylandKeyboard>(keyboard);
|
||||
}
|
||||
else if (!have_keyboard && mKeyboard!= nullptr)
|
||||
{
|
||||
mKeyboard.reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,13 +46,3 @@ void WaylandSeatInterface::seatNameEvent(void *data, struct wl_seat *wl_seat, co
|
|||
{
|
||||
MLOG_INFO("seat name: " << name);
|
||||
}
|
||||
|
||||
void WaylandSeatInterface::setKeyboard(wl_keyboard* keyboard)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void WaylandSeatInterface::setPointer(wl_pointer* pointer)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue