Update of /cvsroot/java-game-lib/LWJGL/src/native/win32
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13019/src/native/win32
Modified Files:
org_lwjgl_opengl_Display.c
Log Message:
Win32: Made the message processing more friendly to potential foreign windows created on the same thread (and thus sharing message queue with LWJGL). Now handleMessages() in Display.c only processes messages for the current lwjgl window.
Index: org_lwjgl_opengl_Display.c
===================================================================
RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Display.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- org_lwjgl_opengl_Display.c 22 Feb 2006 10:30:35 -0000 1.33
+++ org_lwjgl_opengl_Display.c 22 Feb 2006 10:47:14 -0000 1.34
@@ -238,25 +238,25 @@
/*
* Handle native Win32 messages
*/
-static void handleMessages(void)
-{
+static void handleMessages(void) {
/*
* Now's our chance to deal with Windows messages that are
* otherwise just piling up and causing everything not to
* work properly
*/
MSG msg;
- while (PeekMessage(
- &msg, // message information
- NULL, // handle to window
- 0, // first message
- 0, // last message
- PM_REMOVE // removal options
- ))
- {
- if (display_hwnd != NULL && msg.hwnd == display_hwnd)
- DispatchMessage(&msg);
- };
+ if (display_hwnd != NULL) {
+ while (PeekMessage(
+ &msg, // message information
+ display_hwnd, // handle to window
+ 0, // first message
+ 0, // last message
+ PM_REMOVE // removal options
+ ))
+ {
+ DispatchMessage(&msg);
+ }
+ }
}
/*
|