mirror of
https://github.com/glfw/glfw.git
synced 2025-12-21 14:42:06 +00:00
Compare commits
3 Commits
93de5df89b
...
07e05e3a1e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07e05e3a1e | ||
|
|
0d2d85d19c | ||
|
|
15f9e1bea7 |
@ -1706,11 +1706,11 @@ static void keyboardHandleKeymap(void* userData,
|
|||||||
|
|
||||||
// Look up the preferred locale, falling back to "C" as default.
|
// Look up the preferred locale, falling back to "C" as default.
|
||||||
locale = getenv("LC_ALL");
|
locale = getenv("LC_ALL");
|
||||||
if (!locale)
|
if (!locale || strlen(locale) == 0)
|
||||||
locale = getenv("LC_CTYPE");
|
locale = getenv("LC_CTYPE");
|
||||||
if (!locale)
|
if (!locale || strlen(locale) == 0)
|
||||||
locale = getenv("LANG");
|
locale = getenv("LANG");
|
||||||
if (!locale)
|
if (!locale || strlen(locale) == 0)
|
||||||
locale = "C";
|
locale = "C";
|
||||||
|
|
||||||
composeTable =
|
composeTable =
|
||||||
@ -1778,24 +1778,6 @@ static void keyboardHandleLeave(void* userData,
|
|||||||
if (!window)
|
if (!window)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Handle any key repeats up to this point. We don't poll as this should be infrequent.
|
|
||||||
uint64_t repeats;
|
|
||||||
if (read(_glfw.wl.keyRepeatTimerfd, &repeats, sizeof(repeats)) == 8)
|
|
||||||
{
|
|
||||||
if(_glfw.wl.keyboardFocus)
|
|
||||||
{
|
|
||||||
for (uint64_t i = 0; i < repeats; i++)
|
|
||||||
{
|
|
||||||
_glfwInputKey(_glfw.wl.keyboardFocus,
|
|
||||||
translateKey(_glfw.wl.keyRepeatScancode),
|
|
||||||
_glfw.wl.keyRepeatScancode,
|
|
||||||
GLFW_PRESS,
|
|
||||||
_glfw.wl.xkb.modifiers);
|
|
||||||
inputText(_glfw.wl.keyboardFocus, _glfw.wl.keyRepeatScancode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct itimerspec timer = {0};
|
struct itimerspec timer = {0};
|
||||||
timerfd_settime(_glfw.wl.keyRepeatTimerfd, 0, &timer, NULL);
|
timerfd_settime(_glfw.wl.keyRepeatTimerfd, 0, &timer, NULL);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user