X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_window.c;h=a5884ae94b5c8b9849c3e94ed258cfebdeb301f1;hb=4d9d03a0ebfcd2c929fb7cc69ed4329c388b47e9;hp=d287a8bfe0a0ffd1afcb386e959588b371db930c;hpb=2badda80f21aaceb769a75861b52642e276e2e80;p=freeglut diff --git a/src/freeglut_window.c b/src/freeglut_window.c index d287a8b..a5884ae 100644 --- a/src/freeglut_window.c +++ b/src/freeglut_window.c @@ -1076,7 +1076,7 @@ static void get_display_origin(int *xp,int *yp) #if TARGET_HOST_POSIX_X11 static Bool fghWindowIsVisible( Display *display, XEvent *event, XPointer arg) { - Window window = arg; + Window window = (Window)arg; return (event->type == MapNotify) && (event->xmap.window == window); } #endif @@ -1092,7 +1092,7 @@ void fgOpenWindow( SFG_Window* window, const char* title, GLboolean gameMode, GLboolean isSubWindow ) { #if TARGET_HOST_POSIX_X11 - XVisualInfo * visualInfo; + XVisualInfo * visualInfo = NULL; XSetWindowAttributes winAttr; XTextProperty textProperty; XSizeHints sizeHints; @@ -1297,7 +1297,7 @@ void fgOpenWindow( SFG_Window* window, const char* title, XFree(visualInfo); if( !isSubWindow) - XPeekIfEvent( fgDisplay.Display, &eventReturnBuffer, &fghWindowIsVisible, window->Window.Handle ); + XPeekIfEvent( fgDisplay.Display, &eventReturnBuffer, &fghWindowIsVisible, (XPointer)(window->Window.Handle) ); #elif TARGET_HOST_MS_WINDOWS @@ -1367,7 +1367,7 @@ void fgOpenWindow( SFG_Window* window, const char* title, if( gameMode ) { /* if in gamemode, query the origin of specified by the -display - * parameter command line (if any) and offset the upper-left corner + * command line parameter (if any) and offset the upper-left corner * of the window so we create the window on that screen. * The -display argument doesn't do anything if not trying to enter * gamemode. @@ -2000,7 +2000,7 @@ void FGAPIENTRY glutFullScreen( void ) } { -#if(WINVER >= 0x0500) +#if(WINVER >= 0x0500) /* Windows 2000 or later */ DWORD s; RECT rect; HMONITOR hMonitor; @@ -2042,9 +2042,8 @@ void FGAPIENTRY glutFullScreen( void ) rect.left = 0; rect.top = 0; - get_display_origin(&rect.left,&rect.top); - rect.right = fgDisplay.ScreenWidth+rect.left; - rect.bottom = fgDisplay.ScreenHeight+rect.top; + rect.right = fgDisplay.ScreenWidth; + rect.bottom = fgDisplay.ScreenHeight; AdjustWindowRect ( &rect, WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, FALSE );