1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 12:18:51 -05:00

Wayland: Fix text input not following key repeat

The manual key repeat implementation did not call text input.
This commit is contained in:
Camilla Löwy 2021-12-30 21:09:23 +01:00
parent bf99587005
commit 1a7da42e6e
4 changed files with 6 additions and 2 deletions

View File

@ -288,6 +288,7 @@ information on what to include when reporting a bug.
- [Wayland] Bugfix: Showing a hidden window did not emit a window refresh event
- [Wayland] Bugfix: Full screen window creation did not ignore `GLFW_VISIBLE`
- [Wayland] Bugfix: Some keys were reported as wrong key or `GLFW_KEY_UNKNOWN`
- [Wayland] Bugfix: Text input did not repeat along with key repeat
- [POSIX] Removed use of deprecated function `gettimeofday`
- [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled
- [WGL] Disabled the DWM swap interval hack for Windows 8 and later (#1072)

View File

@ -535,7 +535,7 @@ static xkb_keysym_t composeSymbol(xkb_keysym_t sym)
}
}
static GLFWbool inputChar(_GLFWwindow* window, uint32_t scancode)
GLFWbool _glfwInputTextWayland(_GLFWwindow* window, uint32_t scancode)
{
const xkb_keysym_t* keysyms;
const xkb_keycode_t keycode = scancode + 8;
@ -577,7 +577,7 @@ static void keyboardHandleKey(void* data,
if (action == GLFW_PRESS)
{
const GLFWbool shouldRepeat = inputChar(window, scancode);
const GLFWbool shouldRepeat = _glfwInputTextWayland(window, scancode);
if (shouldRepeat && _glfw.wl.keyboardRepeatRate > 0)
{

View File

@ -495,4 +495,5 @@ GLFWbool _glfwGetGammaRampWayland(_GLFWmonitor* monitor, GLFWgammaramp* ramp);
void _glfwSetGammaRampWayland(_GLFWmonitor* monitor, const GLFWgammaramp* ramp);
void _glfwAddOutputWayland(uint32_t name, uint32_t version);
GLFWbool _glfwInputTextWayland(_GLFWwindow* window, uint32_t scancode);

View File

@ -767,6 +767,8 @@ static void handleEvents(int timeout)
_glfw.wl.keyboardLastScancode,
GLFW_PRESS,
_glfw.wl.xkb.modifiers);
_glfwInputTextWayland(_glfw.wl.keyboardFocus,
_glfw.wl.keyboardLastScancode);
}
}
}