mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Wayland: Fix repeated keys reported to NULL window
This fixes a race between the key repeat logic and the surface leave event handler, which could result in repeated keys being reported with a window of NULL. Fixes #1704.
This commit is contained in:
parent
399c2a1fad
commit
c72da994ba
@ -188,6 +188,7 @@ information on what to include when reporting a bug.
|
|||||||
- [Wayland] Removed support for `wl_shell` (#1443)
|
- [Wayland] Removed support for `wl_shell` (#1443)
|
||||||
- [Wayland] Bugfix: The `GLFW_HAND_CURSOR` shape used the wrong image (#1432)
|
- [Wayland] Bugfix: The `GLFW_HAND_CURSOR` shape used the wrong image (#1432)
|
||||||
- [Wayland] Bugfix: `CLOCK_MONOTONIC` was not correctly enabled
|
- [Wayland] Bugfix: `CLOCK_MONOTONIC` was not correctly enabled
|
||||||
|
- [Wayland] Bugfix: Repeated keys could be reported with `NULL` window (#1704)
|
||||||
- [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled
|
- [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled
|
||||||
- [NSGL] Removed enforcement of forward-compatible flag for core contexts
|
- [NSGL] Removed enforcement of forward-compatible flag for core contexts
|
||||||
- [NSGL] Bugfix: `GLFW_COCOA_RETINA_FRAMEBUFFER` had no effect on newer
|
- [NSGL] Bugfix: `GLFW_COCOA_RETINA_FRAMEBUFFER` had no effect on newer
|
||||||
@ -398,6 +399,7 @@ skills.
|
|||||||
- Torsten Walluhn
|
- Torsten Walluhn
|
||||||
- Patrick Walton
|
- Patrick Walton
|
||||||
- Xo Wang
|
- Xo Wang
|
||||||
|
- Waris
|
||||||
- Jay Weisskopf
|
- Jay Weisskopf
|
||||||
- Frank Wille
|
- Frank Wille
|
||||||
- Ryogo Yoshimura
|
- Ryogo Yoshimura
|
||||||
|
@ -749,10 +749,17 @@ static void handleEvents(int timeout)
|
|||||||
if (read_ret != 8)
|
if (read_ret != 8)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i < repeats; ++i)
|
if (_glfw.wl.keyboardFocus)
|
||||||
_glfwInputKey(_glfw.wl.keyboardFocus, _glfw.wl.keyboardLastKey,
|
{
|
||||||
_glfw.wl.keyboardLastScancode, GLFW_REPEAT,
|
for (i = 0; i < repeats; ++i)
|
||||||
_glfw.wl.xkb.modifiers);
|
{
|
||||||
|
_glfwInputKey(_glfw.wl.keyboardFocus,
|
||||||
|
_glfw.wl.keyboardLastKey,
|
||||||
|
_glfw.wl.keyboardLastScancode,
|
||||||
|
GLFW_REPEAT,
|
||||||
|
_glfw.wl.xkb.modifiers);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fds[2].revents & POLLIN)
|
if (fds[2].revents & POLLIN)
|
||||||
|
Loading…
Reference in New Issue
Block a user