1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 20:28:49 -05:00

Renamed window close request variable.

This commit is contained in:
Camilla Berglund 2010-09-16 06:02:44 +02:00
parent f06489d6cb
commit 867e747add
5 changed files with 9 additions and 9 deletions

View File

@ -56,7 +56,7 @@
- (BOOL)windowShouldClose:(id)sender - (BOOL)windowShouldClose:(id)sender
{ {
window->closed = GL_TRUE; window->closeRequested = GL_TRUE;
return NO; return NO;
} }
@ -113,7 +113,7 @@
_GLFWwindow* window; _GLFWwindow* window;
for (window = _glfwLibrary.windowListHead; window; window = window->next) for (window = _glfwLibrary.windowListHead; window; window = window->next)
window->closed = GL_TRUE; window->closeRequested = GL_TRUE;
return NSTerminateCancel; return NSTerminateCancel;
} }

View File

@ -155,7 +155,7 @@ typedef struct _GLFWwindow
// Window settings and state // Window settings and state
GLboolean iconified; // GL_TRUE if this window is iconified GLboolean iconified; // GL_TRUE if this window is iconified
GLboolean closed; // GL_TRUE if this window should be closed GLboolean closeRequested; // GL_TRUE if this window should be closed
int width, height; int width, height;
int positionX, positionY; int positionX, positionY;
int mode; // GLFW_WINDOW or GLFW_FULLSCREEN int mode; // GLFW_WINDOW or GLFW_FULLSCREEN

View File

@ -731,7 +731,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
case WM_CLOSE: case WM_CLOSE:
{ {
// Flag this window for closing (handled in glfwPollEvents) // Flag this window for closing (handled in glfwPollEvents)
window->closed = GL_TRUE; window->closeRequested = GL_TRUE;
return 0; return 0;
} }
@ -1675,7 +1675,7 @@ void _glfwPlatformPollEvents(void)
window = _glfwLibrary.windowListHead; window = _glfwLibrary.windowListHead;
while (window) while (window)
{ {
window->closed = GL_TRUE; window->closeRequested = GL_TRUE;
window = window->next; window = window->next;
} }

View File

@ -55,10 +55,10 @@ static void closeFlaggedWindows(void)
for (window = _glfwLibrary.windowListHead; window; ) for (window = _glfwLibrary.windowListHead; window; )
{ {
if (window->closed && window->windowCloseCallback) if (window->closeRequested && window->windowCloseCallback)
window->closed = window->windowCloseCallback(window); window->closeRequested = window->windowCloseCallback(window);
if (window->closed) if (window->closeRequested)
{ {
_GLFWwindow* next = window->next; _GLFWwindow* next = window->next;
glfwCloseWindow(window); glfwCloseWindow(window);

View File

@ -1242,7 +1242,7 @@ static void processSingleEvent(void)
// The window manager was asked to close the window, for example by // The window manager was asked to close the window, for example by
// the user pressing a 'close' window decoration button // the user pressing a 'close' window decoration button
window->closed = GL_TRUE; window->closeRequested = GL_TRUE;
} }
else if (window->X11.wmPing != None && else if (window->X11.wmPing != None &&
(Atom) event.xclient.data.l[ 0 ] == window->X11.wmPing) (Atom) event.xclient.data.l[ 0 ] == window->X11.wmPing)