projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
now that menu's no longer take focus from their parent, clicking the non-client area...
[freeglut]
/
src
/
x11
/
fg_window_x11.c
diff --git
a/src/x11/fg_window_x11.c
b/src/x11/fg_window_x11.c
index
b6943d3
..
d2a3bbd
100644
(file)
--- a/
src/x11/fg_window_x11.c
+++ b/
src/x11/fg_window_x11.c
@@
-42,10
+42,10
@@
static int fghResizeFullscrToggle(void)
{
XWindowAttributes attributes;
static int fghResizeFullscrToggle(void)
{
XWindowAttributes attributes;
+ SFG_Window *win = fgStructure.CurrentWindow;
if(glutGet(GLUT_FULL_SCREEN)) {
/* restore original window size */
if(glutGet(GLUT_FULL_SCREEN)) {
/* restore original window size */
- SFG_Window *win = fgStructure.CurrentWindow;
fgStructure.CurrentWindow->State.WorkMask = GLUT_SIZE_WORK;
fgStructure.CurrentWindow->State.DesiredWidth = win->State.pWState.OldWidth;
fgStructure.CurrentWindow->State.DesiredHeight = win->State.pWState.OldHeight;
fgStructure.CurrentWindow->State.WorkMask = GLUT_SIZE_WORK;
fgStructure.CurrentWindow->State.DesiredWidth = win->State.pWState.OldWidth;
fgStructure.CurrentWindow->State.DesiredHeight = win->State.pWState.OldHeight;
@@
-300,12
+300,6
@@
void fgPlatformOpenWindow( SFG_Window* window, const char* title,
}
#endif
}
#endif
- /*
- * XXX Assume the new window is visible by default
- * XXX Is this a safe assumption?
- */
- window->State.Visible = GL_TRUE;
-
sizeHints.flags = 0;
if ( positionUse )
sizeHints.flags |= USPosition;
sizeHints.flags = 0;
if ( positionUse )
sizeHints.flags |= USPosition;
@@
-362,11
+356,16
@@
void fgPlatformOpenWindow( SFG_Window* window, const char* title,
fgRegisterDevices( fgDisplay.pDisplay.Display, &(window->Window.Handle) );
#endif
fgRegisterDevices( fgDisplay.pDisplay.Display, &(window->Window.Handle) );
#endif
- XMapWindow( fgDisplay.pDisplay.Display, window->Window.Handle );
+ if (!window->IsMenu) /* Don't show window after creation if its a menu */
+ {
+ XMapWindow( fgDisplay.pDisplay.Display, window->Window.Handle );
+ window->State.Visible = GL_TRUE;
+ }
XFree(visualInfo);
XFree(visualInfo);
- if( !isSubWindow)
+ /* wait till window visible */
+ if( !isSubWindow && !window->IsMenu)
XPeekIfEvent( fgDisplay.pDisplay.Display, &eventReturnBuffer, &fghWindowIsVisible, (XPointer)(window->Window.Handle) );
#undef WINDOW_CONFIG
}
XPeekIfEvent( fgDisplay.pDisplay.Display, &eventReturnBuffer, &fghWindowIsVisible, (XPointer)(window->Window.Handle) );
#undef WINDOW_CONFIG
}