variable declaration in wrong place
[freeglut] / src / x11 / fg_window_x11.c
index b6943d3..71814ac 100644 (file)
 static int fghResizeFullscrToggle(void)
 {
     XWindowAttributes attributes;
+    SFG_Window *win = fgStructure.CurrentWindow;
 
     if(glutGet(GLUT_FULL_SCREEN)) {
         /* restore original window size */
-        SFG_Window *win = fgStructure.CurrentWindow;
         fgStructure.CurrentWindow->State.WorkMask = GLUT_SIZE_WORK;
         fgStructure.CurrentWindow->State.DesiredWidth  = win->State.pWState.OldWidth;
         fgStructure.CurrentWindow->State.DesiredHeight = win->State.pWState.OldHeight;