From ca07a067a8ab364a944d97ee6282c7961d88487a Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 21 Jan 2013 17:57:32 +0100 Subject: [PATCH] Moved WM_DELETE_WINDOW retrieval to init. --- src/x11_init.c | 5 +++++ src/x11_window.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/x11_init.c b/src/x11_init.c index 3218a778..8950b4ca 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -484,6 +484,11 @@ static GLboolean initDisplay(void) _glfw.x11.screen = DefaultScreen(_glfw.x11.display); _glfw.x11.root = RootWindow(_glfw.x11.display, _glfw.x11.screen); + // Find or create the protocol atom for window close notifications + _glfw.x11.wmDeleteWindow = XInternAtom(_glfw.x11.display, + "WM_DELETE_WINDOW", + False); + // Check for XF86VidMode extension _glfw.x11.vidmode.available = XF86VidModeQueryExtension(_glfw.x11.display, diff --git a/src/x11_window.c b/src/x11_window.c index 6267e145..8e564f9a 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -164,11 +164,6 @@ static GLboolean createWindow(_GLFWwindow* window, window->x11.overrideRedirect = GL_TRUE; } - // Find or create the protocol atom for window close notifications - _glfw.x11.wmDeleteWindow = XInternAtom(_glfw.x11.display, - "WM_DELETE_WINDOW", - False); - // Declare the WM protocols supported by GLFW { int count = 0;