mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-27 03:42:49 +00:00
Wayland: Only use key repeat events from server is repeat rate == 0
Some checks are pending
CI / Linux (python=3.13 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.11 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
Some checks are pending
CI / Linux (python=3.13 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.11 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
Fixes #10070
This commit is contained in:
parent
a20ea1b96a
commit
2096948cbc
1 changed files with 5 additions and 2 deletions
7
glfw/wl_init.c
vendored
7
glfw/wl_init.c
vendored
|
|
@ -325,7 +325,7 @@ static void keyboardHandleKeymap(void* data UNUSED,
|
|||
}
|
||||
|
||||
static bool
|
||||
needs_synthetic_key_repeat(void) { return _glfw.wl.keyboardRepeatRate > 0 && !_glfw.wl.has_key_repeat_events; }
|
||||
needs_synthetic_key_repeat(void) { return _glfw.wl.keyboardRepeatRate > 0; }
|
||||
|
||||
static void
|
||||
start_key_repeat_timer(bool initial) {
|
||||
|
|
@ -416,7 +416,10 @@ static void keyboardHandleKey(void* data UNUSED,
|
|||
case WL_KEYBOARD_KEY_STATE_PRESSED: action = GLFW_PRESS; break;
|
||||
case WL_KEYBOARD_KEY_STATE_RELEASED: action = GLFW_RELEASE; break;
|
||||
#ifdef WL_KEYBOARD_KEY_STATE_REPEATED_SINCE_VERSION
|
||||
case WL_KEYBOARD_KEY_STATE_REPEATED: action = GLFW_REPEAT; break;
|
||||
case WL_KEYBOARD_KEY_STATE_REPEATED:
|
||||
if (needs_synthetic_key_repeat()) return;
|
||||
action = GLFW_REPEAT;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue