|
From: Elias N. <eli...@us...> - 2003-02-12 12:07:54
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv28402/win32 Modified Files: org_lwjgl_Display.cpp Log Message: Don't allow to show the window menu Index: org_lwjgl_Display.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Display.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- org_lwjgl_Display.cpp 12 Feb 2003 09:33:11 -0000 1.23 +++ org_lwjgl_Display.cpp 12 Feb 2003 12:07:50 -0000 1.24 @@ -148,36 +148,42 @@ case SC_SCREENSAVE: case SC_MONITORPOWER: return 0L; + case SC_MINIMIZE: + isMinimized = true; + appActivate(true); break; - case SC_MINIMIZE: - isMinimized = true; - appActivate(true); - break; - case SC_RESTORE: - isMinimized = false; - appActivate(false); - break; - case SC_CLOSE: - environment->SetStaticBooleanField(clsDisplay, fidclose, true); - //don't continue processing this command since this - //would shutdown the window, which the application might not want to - return 0L; - default: - break; + case SC_RESTORE: + isMinimized = false; + appActivate(false); + break; + case SC_CLOSE: + environment->SetStaticBooleanField(clsDisplay, fidclose, true); + //don't continue processing this command since this + //would shutdown the window, which the application might not want to + return 0L; + default: + return 0L; // don't allow the window menu to show } - } + } + break; case WM_ACTIVATE: { - switch(LOWORD(wParam)) { - case WA_ACTIVE: - case WA_CLICKACTIVE: - isMinimized = false; - break; - case WA_INACTIVE: - isMinimized = true; - break; - } - appActivate(!isMinimized); + switch(LOWORD(wParam)) { + case WA_ACTIVE: + case WA_CLICKACTIVE: + isMinimized = false; + break; + case WA_INACTIVE: + isMinimized = true; + break; + } + appActivate(!isMinimized); + } + break; + case WM_QUIT: + { + environment->SetStaticBooleanField(clsDisplay, fidclose, true); + return 0L; } } @@ -201,15 +207,9 @@ hwnd, // handle to window 0, // first message 0, // last message - PM_NOREMOVE // removal options + PM_REMOVE // removal options )) { - if (GetMessage (&msg, NULL, 0, 0) <= 0) { -#ifdef _DEBUG - printf("We should quit here...\n"); -#endif - return; - } TranslateMessage(&msg); DispatchMessage(&msg); }; |