ScreenToClient( window->Window.Handle, &mouse_pos );
hwnd = ChildWindowFromPoint(window->Window.Handle, mouse_pos);
ScreenToClient( window->Window.Handle, &mouse_pos );
hwnd = ChildWindowFromPoint(window->Window.Handle, mouse_pos);
/* Update visibility state of the window */
if (wParam==SIZE_MINIMIZED)
fghPlatformOnWindowStatusNotify(window,GL_FALSE,GL_FALSE);
/* Update visibility state of the window */
if (wParam==SIZE_MINIMIZED)
fghPlatformOnWindowStatusNotify(window,GL_FALSE,GL_FALSE);
fghPlatformOnWindowStatusNotify(window,GL_TRUE,GL_FALSE);
/* Check window visible, we don't want do anything when we get a WM_SIZE because the user or glutIconifyWindow minimized the window */
fghPlatformOnWindowStatusNotify(window,GL_TRUE,GL_FALSE);
/* Check window visible, we don't want do anything when we get a WM_SIZE because the user or glutIconifyWindow minimized the window */
/* For child window, we should return relative to upper-left
* of parent's client area.
*/
/* For child window, we should return relative to upper-left
* of parent's client area.
*/
ScreenToClient(window->Parent->Window.Handle,&topleft);
windowRect.left = topleft.x;
ScreenToClient(window->Parent->Window.Handle,&topleft);
windowRect.left = topleft.x;
default:
/* Handle unhandled messages */
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
default:
/* Handle unhandled messages */
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
/* For fullscreen mode, find the monitor that is covered the most
* by the window and get its rect as the resize target.
*/
/* For fullscreen mode, find the monitor that is covered the most
* by the window and get its rect as the resize target.
*/
- GetWindowRect(window->Window.Handle, &rect);
- hMonitor= MonitorFromRect(&rect, MONITOR_DEFAULTTONEAREST);
+ hMonitor= MonitorFromWindow(window->Window.Handle, MONITOR_DEFAULTTONEAREST);
- if (win->IsMenu && (!fgStructure.GameModeWindow || win->ActiveMenu->ParentWindow != fgStructure.GameModeWindow))
- cmdShow = SW_SHOWNA; /* Just show, don't activate window if its a menu. Only exception is when the parent is a gamemode window as the menu would pop under it when we do this... */
+ if (win->IsMenu && !fgStructure.GameModeWindow)
+ cmdShow = SW_SHOWNA; /* Just show, don't activate window if its a menu. Only exception is when there is a gamemode window as the menu would pop under it when we do this... */