This commit is contained in:
Kovid Goyal 2020-11-22 12:24:00 +05:30
parent 53797b9ead
commit cb5ac1fcf8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

4
glfw/wl_init.c vendored
View File

@ -445,15 +445,11 @@ static void keyboardHandleKey(void* data UNUSED,
_glfw.wl.serial = serial;
glfw_xkb_handle_key_event(window, &_glfw.wl.xkb, key, action);
bool repeatable = false;
if (action == GLFW_PRESS && _glfw.wl.keyboardRepeatRate > 0 && glfw_xkb_should_repeat(&_glfw.wl.xkb, key))
{
_glfw.wl.keyRepeatInfo.key = key;
repeatable = true;
_glfw.wl.keyRepeatInfo.keyboardFocus = window;
}
if (repeatable) {
changeTimerInterval(&_glfw.wl.eventLoopData, _glfw.wl.keyRepeatInfo.keyRepeatTimer, _glfw.wl.keyboardRepeatDelay);
toggleTimer(&_glfw.wl.eventLoopData, _glfw.wl.keyRepeatInfo.keyRepeatTimer, 1);
} else if (action == GLFW_RELEASE && key == _glfw.wl.keyRepeatInfo.key) {