Remove title member from window config

The window title is already available in the window struct.
This commit is contained in:
Camilla Löwy 2024-03-13 00:19:11 +01:00
parent bfcb98fb6c
commit 4c64184455
5 changed files with 7 additions and 9 deletions

View File

@ -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];

View File

@ -402,7 +402,6 @@ struct _GLFWwndconfig
int ypos;
int width;
int height;
const char* title;
GLFWbool resizable;
GLFWbool visible;
GLFWbool decorated;

View File

@ -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;

View File

@ -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))

View File

@ -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);