glut_fullscrn.c revision 553f1899
1 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#ifdef __VMS 9#include <GL/vms_x_fix.h> 10#endif 11 12#include <stdio.h> /* SunOS multithreaded assert() needs <stdio.h>. Lame. */ 13#include <assert.h> 14 15#if !defined(_WIN32) 16#include <X11/Xlib.h> 17#endif 18 19/* SGI optimization introduced in IRIX 6.3 to avoid X server 20 round trips for interning common X atoms. */ 21#if defined(_SGI_EXTRA_PREDEFINES) && !defined(NO_FAST_ATOMS) 22#include <X11/SGIFastAtom.h> 23#else 24#define XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how) 25#endif 26 27#include "glutint.h" 28 29/* CENTRY */ 30void GLUTAPIENTRY 31glutFullScreen(void) 32{ 33 assert(!__glutCurrentWindow->parent); 34 IGNORE_IN_GAME_MODE(); 35#if !defined(_WIN32) 36 if (__glutMotifHints == None) { 37 __glutMotifHints = XSGIFastInternAtom(__glutDisplay, "_MOTIF_WM_HINTS", 38 SGI_XA__MOTIF_WM_HINTS, 0); 39 if (__glutMotifHints == None) { 40 __glutWarning("Could not intern X atom for _MOTIF_WM_HINTS."); 41 } 42 } 43#endif 44 45 __glutCurrentWindow->desiredX = 0; 46 __glutCurrentWindow->desiredY = 0; 47 __glutCurrentWindow->desiredWidth = __glutScreenWidth; 48 __glutCurrentWindow->desiredHeight = __glutScreenHeight; 49 __glutCurrentWindow->desiredConfMask |= CWX | CWY | CWWidth | CWHeight; 50 51 __glutPutOnWorkList(__glutCurrentWindow, 52 GLUT_CONFIGURE_WORK | GLUT_FULL_SCREEN_WORK); 53} 54 55/* ENDCENTRY */ 56