wl_seat: send repeat data from current keyboard on bind

ref #6515
This commit is contained in:
Vaxry 2024-06-15 21:24:26 +02:00
parent 89f795da98
commit 908bec1564

View file

@ -200,10 +200,13 @@ CWLKeyboardResource::CWLKeyboardResource(SP<CWlKeyboard> resource_, SP<CWLSeatRe
resource->setRelease([this](CWlKeyboard* r) { PROTO::seat->destroyResource(this); }); resource->setRelease([this](CWlKeyboard* r) { PROTO::seat->destroyResource(this); });
resource->setOnDestroy([this](CWlKeyboard* r) { PROTO::seat->destroyResource(this); }); resource->setOnDestroy([this](CWlKeyboard* r) { PROTO::seat->destroyResource(this); });
static auto REPEAT = CConfigValue<Hyprlang::INT>("input:repeat_rate"); if (!g_pSeatManager->keyboard) {
static auto DELAY = CConfigValue<Hyprlang::INT>("input:repeat_delay"); LOGM(ERR, "No keyboard on bound wl_keyboard??");
return;
}
sendKeymap(g_pSeatManager->keyboard.lock()); sendKeymap(g_pSeatManager->keyboard.lock());
repeatInfo(*REPEAT, *DELAY); repeatInfo(g_pSeatManager->keyboard->repeatRate, g_pSeatManager->keyboard->repeatDelay);
} }
bool CWLKeyboardResource::good() { bool CWLKeyboardResource::good() {