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