/*
- * freeglut_main_mswin.c
+ * fg_main_mswin.c
*
* The Windows-specific mouse cursor related stuff.
*
/* Get mouse position at time of message */
DWORD mouse_pos_dw = GetMessagePos();
- POINT mouse_pos = {GET_X_LPARAM(mouse_pos_dw), GET_Y_LPARAM(mouse_pos_dw)};
+ POINT mouse_pos;
+ mouse_pos.x = GET_X_LPARAM(mouse_pos_dw);
+ mouse_pos.y = GET_Y_LPARAM(mouse_pos_dw);
ScreenToClient( window->Window.Handle, &mouse_pos );
hwnd = ChildWindowFromPoint(window->Window.Handle, mouse_pos);
/* For child window, we should return relative to upper-left
* of parent's client area.
*/
- POINT topleft = {windowRect.left,windowRect.top};
+ POINT topleft;
+ topleft.x = windowRect.left;
+ topleft.y = windowRect.top;
ScreenToClient(window->Parent->Window.Handle,&topleft);
windowRect.left = topleft.x;
win = win->Parent;
break;
case DesireNormalState:
- 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... */
else
cmdShow = SW_SHOW;
break;
}
ShowWindow( win->Window.Handle, cmdShow );
-}
\ No newline at end of file
+}