summaryrefslogtreecommitdiff
path: root/src/protocols/core/Seat.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-06-15 21:24:26 +0200
committerVaxry <vaxry@vaxry.net>2024-06-15 21:24:34 +0200
commit908bec1564e4fe448a2a8a7371bbb0621c62b11a (patch)
tree662205de81e3d09a474dad31fab39374103ac142 /src/protocols/core/Seat.cpp
parent89f795da98cc53faf7e3a683d8c189aa24986267 (diff)
wl_seat: send repeat data from current keyboard on bind
ref #6515
Diffstat (limited to 'src/protocols/core/Seat.cpp')
-rw-r--r--src/protocols/core/Seat.cpp9
1 files 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<CWlKeyboard> resource_, SP<CWLSeatRe
resource->setRelease([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");
- static auto DELAY = CConfigValue<Hyprlang::INT>("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() {