implemented WM_DISPLAYCHANGE message handler per patch in very old bug report (1212167). This for us only helps make sure that glutGet(GLUT_SCREEN_WIDTH) and glutGet(GLUT_SCREEN_HEIGHT) return the correct values, and help make sure menu placement is clipped against the correct window extents. Thanks Dan!

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1597 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
dcnieho 2013-04-05 09:13:48 +00:00
parent 3aaad918c1
commit 1bb4fa9988

View File

@ -981,6 +981,12 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR
/* Help screen says this message must be passed to "DefWindowProc" */ /* Help screen says this message must be passed to "DefWindowProc" */
break; break;
case WM_DISPLAYCHANGE: /* 0x007E */
/* The system display resolution/depth has changed */
fgDisplay.ScreenWidth = LOWORD(lParam);
fgDisplay.ScreenHeight = HIWORD(lParam);
break;
case WM_SYSCOMMAND : /* 0x0112 */ case WM_SYSCOMMAND : /* 0x0112 */
{ {
/* /*