From 814beaa77f437cf4cf6cac9f748235488f6478a1 Mon Sep 17 00:00:00 2001 From: "John F. Fay" Date: Sat, 4 Feb 2012 14:35:46 +0000 Subject: [PATCH] Moving all the X11-specific "fgDisplay" structure fields into their substructure. I can't see how the X11 build succeeded before this. git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1046 7f0cb862-5218-0410-a997-914c9d46530a --- src/Common/freeglut_gamemode.c | 4 ++-- src/Common/freeglut_state.c | 2 +- src/Common/freeglut_window.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Common/freeglut_gamemode.c b/src/Common/freeglut_gamemode.c index d3df2bc..f69595c 100644 --- a/src/Common/freeglut_gamemode.c +++ b/src/Common/freeglut_gamemode.c @@ -80,7 +80,7 @@ static int xrandr_resize(int xsz, int ysz, int rate, int just_checking) XRRFreeScreenConfigInfo(xrr_config); } - if(!(xrr_config = XRRGetScreenInfo(fgDisplay.pDisplay.Display, fgDisplay.RootWindow))) { + if(!(xrr_config = XRRGetScreenInfo(fgDisplay.pDisplay.Display, fgDisplay.pDisplay.RootWindow))) { fgWarning("XRRGetScreenInfo failed"); break; } @@ -622,7 +622,7 @@ int FGAPIENTRY glutEnterGameMode( void ) Window child; /* Change to viewport to the window topleft edge: */ - if( !XF86VidModeSetViewPort( fgDisplay.pDisplay.Display, fgDisplay.Screen, 0, 0 ) ) + if( !XF86VidModeSetViewPort( fgDisplay.pDisplay.Display, fgDisplay.pDisplay.Screen, 0, 0 ) ) fgWarning( "XF86VidModeSetViewPort failed" ); /* diff --git a/src/Common/freeglut_state.c b/src/Common/freeglut_state.c index 8962df3..06681eb 100644 --- a/src/Common/freeglut_state.c +++ b/src/Common/freeglut_state.c @@ -155,7 +155,7 @@ int fgPlatformGlutGet ( GLenum eWhat ) XTranslateCoordinates( fgDisplay.pDisplay.Display, fgStructure.CurrentWindow->Window.Handle, - fgDisplay.RootWindow, + fgDisplay.pDisplay.RootWindow, 0, 0, &x, &y, &w); switch ( eWhat ) diff --git a/src/Common/freeglut_window.c b/src/Common/freeglut_window.c index 69aba28..9b28940 100644 --- a/src/Common/freeglut_window.c +++ b/src/Common/freeglut_window.c @@ -306,7 +306,7 @@ GLXFBConfig* fgChooseFBConfig( int *numcfgs ) ATTRIB( None ); fbconfigArray = glXChooseFBConfig( fgDisplay.pDisplay.Display, - fgDisplay.Screen, + fgDisplay.pDisplay.Screen, attributes, &fbconfigArraySize ); } @@ -477,16 +477,16 @@ static int fghEwmhFullscrToggle(void) XEvent xev; long evmask = SubstructureRedirectMask | SubstructureNotifyMask; - if(!fgDisplay.State || !fgDisplay.StateFullScreen) { + if(!fgDisplay.pDisplay.State || !fgDisplay.pDisplay.StateFullScreen) { return -1; } xev.type = ClientMessage; xev.xclient.window = fgStructure.CurrentWindow->Window.Handle; - xev.xclient.message_type = fgDisplay.State; + xev.xclient.message_type = fgDisplay.pDisplay.State; xev.xclient.format = 32; xev.xclient.data.l[0] = _NET_WM_STATE_TOGGLE; - xev.xclient.data.l[1] = fgDisplay.StateFullScreen; + xev.xclient.data.l[1] = fgDisplay.pDisplay.StateFullScreen; xev.xclient.data.l[2] = 0; /* no second property to toggle */ xev.xclient.data.l[3] = 1; /* source indication: application */ xev.xclient.data.l[4] = 0; /* unused */ -- 1.7.10.4