diff --git a/src/cocoa_window.m b/src/cocoa_window.m index e69b5fe0..2bff22a6 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -884,7 +884,7 @@ static GLFWbool createNativeWindow(_GLFWwindow* window, [window->ns.object setContentView:window->ns.view]; [window->ns.object makeFirstResponder:window->ns.view]; - [window->ns.object setTitle:@(wndconfig->title)]; + [window->ns.object setTitle:@(window->title)]; [window->ns.object setDelegate:window->ns.delegate]; [window->ns.object setAcceptsMouseMovedEvents:YES]; [window->ns.object setRestorable:NO]; diff --git a/src/internal.h b/src/internal.h index 4f097aa8..de703740 100644 --- a/src/internal.h +++ b/src/internal.h @@ -402,7 +402,6 @@ struct _GLFWwndconfig int ypos; int width; int height; - const char* title; GLFWbool resizable; GLFWbool visible; GLFWbool decorated; diff --git a/src/win32_window.c b/src/win32_window.c index 26f9684b..6427a673 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -1377,7 +1377,7 @@ static int createNativeWindow(_GLFWwindow* window, frameHeight = rect.bottom - rect.top; } - wideTitle = _glfwCreateWideStringFromUTF8Win32(wndconfig->title); + wideTitle = _glfwCreateWideStringFromUTF8Win32(window->title); if (!wideTitle) return GLFW_FALSE; diff --git a/src/window.c b/src/window.c index e03121a4..3a3b66df 100644 --- a/src/window.c +++ b/src/window.c @@ -208,7 +208,6 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, wndconfig.width = width; wndconfig.height = height; - wndconfig.title = title; ctxconfig.share = (_GLFWwindow*) share; if (!_glfwIsValidContextConfig(&ctxconfig)) diff --git a/src/x11_window.c b/src/x11_window.c index 322349f0..986bfb93 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -754,13 +754,13 @@ static GLFWbool createNativeWindow(_GLFWwindow* window, const char* resourceName = getenv("RESOURCE_NAME"); if (resourceName && strlen(resourceName)) hint->res_name = (char*) resourceName; - else if (strlen(wndconfig->title)) - hint->res_name = (char*) wndconfig->title; + else if (strlen(window->title)) + hint->res_name = (char*) window->title; else hint->res_name = (char*) "glfw-application"; - if (strlen(wndconfig->title)) - hint->res_class = (char*) wndconfig->title; + if (strlen(window->title)) + hint->res_class = (char*) window->title; else hint->res_class = (char*) "GLFW-Application"; } @@ -780,7 +780,7 @@ static GLFWbool createNativeWindow(_GLFWwindow* window, if (_glfw.x11.im) _glfwCreateInputContextX11(window); - _glfwSetWindowTitleX11(window, wndconfig->title); + _glfwSetWindowTitleX11(window, window->title); _glfwGetWindowPosX11(window, &window->x11.xpos, &window->x11.ypos); _glfwGetWindowSizeX11(window, &window->x11.width, &window->x11.height);