From 908bec1564e4fe448a2a8a7371bbb0621c62b11a Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 15 Jun 2024 21:24:26 +0200 Subject: [PATCH] wl_seat: send repeat data from current keyboard on bind ref #6515 --- src/protocols/core/Seat.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/protocols/core/Seat.cpp b/src/protocols/core/Seat.cpp index 331eb15e..8f9174f5 100644 --- a/src/protocols/core/Seat.cpp +++ b/src/protocols/core/Seat.cpp @@ -200,10 +200,13 @@ CWLKeyboardResource::CWLKeyboardResource(SP resource_, SPsetRelease([this](CWlKeyboard* r) { PROTO::seat->destroyResource(this); }); resource->setOnDestroy([this](CWlKeyboard* r) { PROTO::seat->destroyResource(this); }); - static auto REPEAT = CConfigValue("input:repeat_rate"); - static auto DELAY = CConfigValue("input:repeat_delay"); + if (!g_pSeatManager->keyboard) { + LOGM(ERR, "No keyboard on bound wl_keyboard??"); + return; + } + sendKeymap(g_pSeatManager->keyboard.lock()); - repeatInfo(*REPEAT, *DELAY); + repeatInfo(g_pSeatManager->keyboard->repeatRate, g_pSeatManager->keyboard->repeatDelay); } bool CWLKeyboardResource::good() {