projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added support for 3Dconnexion Space Navigator.
[freeglut]
/
src
/
mswin
/
fg_window_mswin.c
diff --git
a/src/mswin/fg_window_mswin.c
b/src/mswin/fg_window_mswin.c
index
3290913
..
39cdada
100644
(file)
--- a/
src/mswin/fg_window_mswin.c
+++ b/
src/mswin/fg_window_mswin.c
@@
-1,5
+1,5
@@
/*
/*
- * freeglut_window_mswin.c
+ * fg_window_mswin.c
*
* The Windows-specific mouse cursor related stuff.
*
*
* The Windows-specific mouse cursor related stuff.
*
@@
-233,7
+233,7
@@
static void fghFillPFD( PIXELFORMATDESCRIPTOR *ppfd, HDC hdc, unsigned char laye
ppfd->cDepthBits = 24;
ppfd->cStencilBits = 8;
ppfd->cDepthBits = 24;
ppfd->cStencilBits = 8;
- ppfd->cAuxBuffers = fghNumberOfAuxBuffersRequested();
+ ppfd->cAuxBuffers = (BYTE) fghNumberOfAuxBuffersRequested();
ppfd->iLayerType = layer_type;
ppfd->bReserved = 0;
ppfd->dwLayerMask = 0;
ppfd->iLayerType = layer_type;
ppfd->bReserved = 0;
ppfd->dwLayerMask = 0;
@@
-570,7
+570,7
@@
void fgPlatformOpenWindow( SFG_Window* window, const char* title,
WNDCLASS wc;
DWORD flags = 0;
DWORD exFlags = 0;
WNDCLASS wc;
DWORD flags = 0;
DWORD exFlags = 0;
- ATOM atom;
+ BOOL atom;
/* Grab the window class we have registered on glutInit(): */
atom = GetClassInfo( fgDisplay.pDisplay.Instance, _T("FREEGLUT"), &wc );
/* Grab the window class we have registered on glutInit(): */
atom = GetClassInfo( fgDisplay.pDisplay.Instance, _T("FREEGLUT"), &wc );
@@
-636,17
+636,11
@@
void fgPlatformOpenWindow( SFG_Window* window, const char* title,
}
if( !sizeUse )
{
}
if( !sizeUse )
{
- if( !window->IsMenu )
- {
- w = CW_USEDEFAULT;
- h = CW_USEDEFAULT;
- }
- else /* fail safe - Windows can make a window of size (0, 0) */
- w = h = 300; /* default window size */
+ w = CW_USEDEFAULT;
+ h = CW_USEDEFAULT;
}
}
-
-#if !defined(_WIN32_WCE) /* no decorations for windows CE */
- if( sizeUse )
+#if !defined(_WIN32_WCE) /* no decorations for windows CE, so nothing to do */
+ else
{
RECT windowRect;
/*
{
RECT windowRect;
/*
@@
-742,8
+736,9
@@
void fgPlatformOpenWindow( SFG_Window* window, const char* title,
#if defined(_WIN32_WCE)
ShowWindow( window->Window.Handle, SW_SHOW );
#else
#if defined(_WIN32_WCE)
ShowWindow( window->Window.Handle, SW_SHOW );
#else
+ if (!window->IsMenu) /* Don't show window after creation if its a menu */
{
{
- BOOL iconic = fgState.ForceIconic && !window->IsMenu && !gameMode && !isSubWindow;
+ BOOL iconic = fgState.ForceIconic && !gameMode && !isSubWindow;
ShowWindow( window->Window.Handle,
iconic ? SW_SHOWMINIMIZED : SW_SHOWNORMAL );
}
ShowWindow( window->Window.Handle,
iconic ? SW_SHOWMINIMIZED : SW_SHOWNORMAL );
}
@@
-792,6
+787,15
@@
void fgPlatformCloseWindow( SFG_Window* window )
free(window->State.pWState.IconTitle);
}
free(window->State.pWState.IconTitle);
}
+/*
+ * Hide's specified window. For windows, currently only used
+ * to immediately hide menu windows...
+ */
+void fgPlatformHideWindow( SFG_Window* window )
+{
+ ShowWindow(window->Window.Handle, SW_HIDE);
+}
+
/*
* Set the current window's title
/*
* Set the current window's title