1 | /* $Id: glut_fullscrn.c,v 1.2 2000-02-09 08:46:11 jeroen Exp $ */
|
---|
2 | /* Copyright (c) Mark J. Kilgard, 1995, 1998. */
|
---|
3 |
|
---|
4 | /* This program is freely distributable without licensing fees
|
---|
5 | and is provided without guarantee or warrantee expressed or
|
---|
6 | implied. This program is -not- in the public domain. */
|
---|
7 |
|
---|
8 | #include <assert.h>
|
---|
9 |
|
---|
10 | #if !defined(_WIN32) && !defined(__WIN32OS2__)
|
---|
11 | #include <X11/Xlib.h>
|
---|
12 | #include <X11/Xatom.h>
|
---|
13 | #endif
|
---|
14 |
|
---|
15 | /* SGI optimization introduced in IRIX 6.3 to avoid X server
|
---|
16 | round trips for interning common X atoms. */
|
---|
17 | #if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS)
|
---|
18 | #include <X11/SGIFastAtom.h>
|
---|
19 | #else
|
---|
20 | #define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how)
|
---|
21 | #endif
|
---|
22 |
|
---|
23 | #include "glutint.h"
|
---|
24 |
|
---|
25 | /* CENTRY */
|
---|
26 | void APIENTRY
|
---|
27 | glutFullScreen(void)
|
---|
28 | {
|
---|
29 | assert(!__glutCurrentWindow->parent);
|
---|
30 | IGNORE_IN_GAME_MODE();
|
---|
31 | #if !defined(_WIN32) && !defined(__WIN32OS2__)
|
---|
32 | if (__glutMotifHints == None) {
|
---|
33 | __glutMotifHints = XSGIFastInternAtom(__glutDisplay, "_MOTIF_WM_HINTS",
|
---|
34 | SGI_XA__MOTIF_WM_HINTS, 0);
|
---|
35 | if (__glutMotifHints == None) {
|
---|
36 | __glutWarning("Could not intern X atom for _MOTIF_WM_HINTS.");
|
---|
37 | }
|
---|
38 | }
|
---|
39 | #endif
|
---|
40 |
|
---|
41 | __glutCurrentWindow->desiredX = 0;
|
---|
42 | __glutCurrentWindow->desiredY = 0;
|
---|
43 | __glutCurrentWindow->desiredWidth = __glutScreenWidth;
|
---|
44 | __glutCurrentWindow->desiredHeight = __glutScreenHeight;
|
---|
45 | __glutCurrentWindow->desiredConfMask |= CWX | CWY | CWWidth | CWHeight;
|
---|
46 |
|
---|
47 | __glutPutOnWorkList(__glutCurrentWindow,
|
---|
48 | GLUT_CONFIGURE_WORK | GLUT_FULL_SCREEN_WORK);
|
---|
49 | }
|
---|
50 |
|
---|
51 | /* ENDCENTRY */
|
---|