Windows: Fix Windows sometimes marking LWJGL apps as "not responding"
This commit is contained in:
parent
8ea2ce415e
commit
c77c8069d6
|
@ -248,12 +248,20 @@ static void handleMessages(void) {
|
||||||
if (display_hwnd != NULL) {
|
if (display_hwnd != NULL) {
|
||||||
while (PeekMessage(
|
while (PeekMessage(
|
||||||
&msg, // message information
|
&msg, // message information
|
||||||
display_hwnd, // handle to window
|
NULL, // handle to window
|
||||||
0, // first message
|
0, // first message
|
||||||
0, // last message
|
0, // last message
|
||||||
PM_REMOVE // removal options
|
PM_REMOVE // removal options
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* It would be better to filter messages
|
||||||
|
* to display_hwnd by specifying that to
|
||||||
|
* PeekMessage instead of this check. However,
|
||||||
|
* Windows will then mark LWJGL apps as "not
|
||||||
|
* responding".
|
||||||
|
*/
|
||||||
|
if (msg.hwnd == display_hwnd)
|
||||||
DispatchMessage(&msg);
|
DispatchMessage(&msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue