diff --git a/src/cocoa/cocoa_window.m b/src/cocoa/cocoa_window.m index b89c3bd2..8f5fbe18 100644 --- a/src/cocoa/cocoa_window.m +++ b/src/cocoa/cocoa_window.m @@ -56,7 +56,7 @@ - (BOOL)windowShouldClose:(id)sender { - window->closed = GL_TRUE; + window->closeRequested = GL_TRUE; return NO; } @@ -113,7 +113,7 @@ _GLFWwindow* window; for (window = _glfwLibrary.windowListHead; window; window = window->next) - window->closed = GL_TRUE; + window->closeRequested = GL_TRUE; return NSTerminateCancel; } diff --git a/src/internal.h b/src/internal.h index 52b5bdff..12a9d3bf 100644 --- a/src/internal.h +++ b/src/internal.h @@ -155,7 +155,7 @@ typedef struct _GLFWwindow // Window settings and state 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 positionX, positionY; int mode; // GLFW_WINDOW or GLFW_FULLSCREEN diff --git a/src/win32/win32_window.c b/src/win32/win32_window.c index 3e158e6f..ecd95806 100644 --- a/src/win32/win32_window.c +++ b/src/win32/win32_window.c @@ -731,7 +731,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, case WM_CLOSE: { // Flag this window for closing (handled in glfwPollEvents) - window->closed = GL_TRUE; + window->closeRequested = GL_TRUE; return 0; } @@ -1675,7 +1675,7 @@ void _glfwPlatformPollEvents(void) window = _glfwLibrary.windowListHead; while (window) { - window->closed = GL_TRUE; + window->closeRequested = GL_TRUE; window = window->next; } diff --git a/src/window.c b/src/window.c index 12ee9f33..412e4b87 100644 --- a/src/window.c +++ b/src/window.c @@ -55,10 +55,10 @@ static void closeFlaggedWindows(void) for (window = _glfwLibrary.windowListHead; window; ) { - if (window->closed && window->windowCloseCallback) - window->closed = window->windowCloseCallback(window); + if (window->closeRequested && window->windowCloseCallback) + window->closeRequested = window->windowCloseCallback(window); - if (window->closed) + if (window->closeRequested) { _GLFWwindow* next = window->next; glfwCloseWindow(window); diff --git a/src/x11/x11_window.c b/src/x11/x11_window.c index 614b0cbc..bafdc721 100644 --- a/src/x11/x11_window.c +++ b/src/x11/x11_window.c @@ -1242,7 +1242,7 @@ static void processSingleEvent(void) // The window manager was asked to close the window, for example by // the user pressing a 'close' window decoration button - window->closed = GL_TRUE; + window->closeRequested = GL_TRUE; } else if (window->X11.wmPing != None && (Atom) event.xclient.data.l[ 0 ] == window->X11.wmPing)