Compare commits

...

3 Commits

Author SHA1 Message Date
Padmadev D
2ffe5d51cb
Merge 0b48190983 into 0d2d85d19c 2025-08-18 12:02:24 +00:00
Doug Binks
0d2d85d19c Revert "Wayland: Keyboard leave event handler now processes key repeats" 2025-08-15 11:27:59 +02:00
padmadevd
0b48190983
Update glfw3.h
resolve build problem in cygwin toolchain
2025-02-16 22:53:19 +05:30
2 changed files with 1 additions and 19 deletions

View File

@ -92,7 +92,7 @@ extern "C" {
/* If we are we on Windows, we want a single define for it.
*/
#if !defined(_WIN32) && (defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__))
#if !defined(_WIN32) && (defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__) || defined(_GLFW_WIN32))
#define _WIN32
#endif /* _WIN32 */

View File

@ -1778,24 +1778,6 @@ static void keyboardHandleLeave(void* userData,
if (!window)
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};
timerfd_settime(_glfw.wl.keyRepeatTimerfd, 0, &timer, NULL);