Win32: Fix glfwWaitEventsTimeout ignoring messages

The bitmask passed to MsgWaitForMultipleObjects was missing
QS_SENDMESSAGE, causing glfwWaitEventsTimeout not to return when the
thread received messages sent from other threads.

Fixes #2408

(cherry picked from commit 509f4131be)
This commit is contained in:
Camilla Löwy 2023-11-15 17:55:07 +01:00
parent ff156743ab
commit 89bea58b18
3 changed files with 3 additions and 1 deletions

View File

@ -140,6 +140,7 @@ video tutorials.
- Marcel Metz - Marcel Metz
- Liam Middlebrook - Liam Middlebrook
- Ave Milia - Ave Milia
- Icyllis Milica
- Jonathan Miller - Jonathan Miller
- Kenneth Miller - Kenneth Miller
- Bruce Mitchener - Bruce Mitchener

View File

@ -124,6 +124,7 @@ information on what to include when reporting a bug.
## Changelog ## Changelog
- [Win32] Fix pkg-config for dynamic library on Windows (#2386, #2420) - [Win32] Fix pkg-config for dynamic library on Windows (#2386, #2420)
- [Win32] Bugfix: `glfwWaitEventsTimeout` did not return for some sent messages (#2408)
- [Wayland] Added improved fallback window decorations via libdecor (#1639,#1693) - [Wayland] Added improved fallback window decorations via libdecor (#1639,#1693)
- [Wayland] Bugfix: Connecting a mouse after `glfwInit` would segfault (#1450) - [Wayland] Bugfix: Connecting a mouse after `glfwInit` would segfault (#1450)
- [Wayland] Disabled alpha channel for opaque windows on systems lacking - [Wayland] Disabled alpha channel for opaque windows on systems lacking

View File

@ -2113,7 +2113,7 @@ void _glfwPlatformWaitEvents(void)
void _glfwPlatformWaitEventsTimeout(double timeout) void _glfwPlatformWaitEventsTimeout(double timeout)
{ {
MsgWaitForMultipleObjects(0, NULL, FALSE, (DWORD) (timeout * 1e3), QS_ALLEVENTS); MsgWaitForMultipleObjects(0, NULL, FALSE, (DWORD) (timeout * 1e3), QS_ALLINPUT);
_glfwPlatformPollEvents(); _glfwPlatformPollEvents();
} }