#include "config.h"
#endif
-#define G_LOG_DOMAIN "freeglut-window"
-
#include "../include/GL/freeglut.h"
#include "freeglut_internal.h"
window->Window.Device = GetDC( window->Window.Handle );
wglMakeCurrent(
window->Window.Device,
- window->Window.Context
- );
+ window->Window.Context
+ );
}
#endif
fgStructure.Window = window;
glXDestroyContext( fgDisplay.Display, window->Window.Context );
XDestroyWindow( fgDisplay.Display, window->Window.Handle );
- XFlush( fgDisplay.Display );
+ XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
#elif TARGET_HOST_WIN32
#if TARGET_HOST_UNIX_X11
XMapWindow( fgDisplay.Display, fgStructure.Window->Window.Handle );
- XFlush( fgDisplay.Display );
+ XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
#elif TARGET_HOST_WIN32
fgDisplay.Screen );
else
XUnmapWindow( fgDisplay.Display, fgStructure.Window->Window.Handle );
- XFlush( fgDisplay.Display );
+ XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
#elif TARGET_HOST_WIN32
XIconifyWindow( fgDisplay.Display, fgStructure.Window->Window.Handle,
fgDisplay.Screen );
- XFlush( fgDisplay.Display );
+ XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
#elif TARGET_HOST_WIN32
&text
);
- XFlush( fgDisplay.Display );
+ XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
}
#elif TARGET_HOST_WIN32
&text
);
- XFlush( fgDisplay.Display );
+ XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
}
#elif TARGET_HOST_WIN32
- SetWindowText( fgStructure.Window->Window.Handle, title );
+ SetWindowText( fgStructure.Window->Window.Handle, title );
#endif
XResizeWindow( fgDisplay.Display, fgStructure.Window->Window.Handle,
width, height );
- XFlush( fgDisplay.Display );
+ XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
+ /*
+ * XXX REALLY shouldn't be done. GLUT docs state that this
+ * XXX isn't even processed immediately, but rather waits
+ * XXX for return to the mainloop. "This allows multiple
+ * XXX glutReshapeWindow, glutPositionWindow, and glutFullScreen
+ * XXX requests to the same window to be coalesced." (This is
+ * XXX having some deleterious effect on a sample program of mine.)
+ * XXX Not only does GLUT not flush at this point, GLUT doesn't even
+ * XXX *do* the reshape at this point! We should probably rip this
+ * XXX out and do what GLUT promises. It would be more efficient, and
+ * XXX might be more compatible.
+ */
#elif TARGET_HOST_WIN32
*/
if ( ! fgStructure.Window->IsMenu )
{
- width += GetSystemMetrics( SM_CXSIZEFRAME ) * 2;
- height += GetSystemMetrics( SM_CYSIZEFRAME ) * 2 +
+ width += GetSystemMetrics( SM_CXSIZEFRAME ) * 2;
+ height += GetSystemMetrics( SM_CYSIZEFRAME ) * 2 +
GetSystemMetrics( SM_CYCAPTION );
}
}
#if TARGET_HOST_UNIX_X11
XMoveWindow( fgDisplay.Display, fgStructure.Window->Window.Handle, x, y );
- XFlush( fgDisplay.Display );
+ XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
#elif TARGET_HOST_WIN32
fgDisplay.ScreenWidth,
fgDisplay.ScreenHeight
);
- XFlush( fgDisplay.Display );
+
+ XFlush( fgDisplay.Display ); /* This is needed */
XTranslateCoordinates(
fgDisplay.Display,
fgStructure.Window->Window.Handle,
-x, -y
);
- XFlush( fgDisplay.Display );
+ XFlush( fgDisplay.Display ); /* XXX Shouldn't need this */
}
}
#elif TARGET_HOST_WIN32