mirror of
https://github.com/glfw/glfw.git
synced 2025-08-31 19:11:49 +00:00
Remove title member from window config
The window title is already available in the window struct.
This commit is contained in:
parent
bfcb98fb6c
commit
4c64184455
@ -884,7 +884,7 @@ static GLFWbool createNativeWindow(_GLFWwindow* window,
|
|||||||
|
|
||||||
[window->ns.object setContentView:window->ns.view];
|
[window->ns.object setContentView:window->ns.view];
|
||||||
[window->ns.object makeFirstResponder: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 setDelegate:window->ns.delegate];
|
||||||
[window->ns.object setAcceptsMouseMovedEvents:YES];
|
[window->ns.object setAcceptsMouseMovedEvents:YES];
|
||||||
[window->ns.object setRestorable:NO];
|
[window->ns.object setRestorable:NO];
|
||||||
|
@ -402,7 +402,6 @@ struct _GLFWwndconfig
|
|||||||
int ypos;
|
int ypos;
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
const char* title;
|
|
||||||
GLFWbool resizable;
|
GLFWbool resizable;
|
||||||
GLFWbool visible;
|
GLFWbool visible;
|
||||||
GLFWbool decorated;
|
GLFWbool decorated;
|
||||||
|
@ -1377,7 +1377,7 @@ static int createNativeWindow(_GLFWwindow* window,
|
|||||||
frameHeight = rect.bottom - rect.top;
|
frameHeight = rect.bottom - rect.top;
|
||||||
}
|
}
|
||||||
|
|
||||||
wideTitle = _glfwCreateWideStringFromUTF8Win32(wndconfig->title);
|
wideTitle = _glfwCreateWideStringFromUTF8Win32(window->title);
|
||||||
if (!wideTitle)
|
if (!wideTitle)
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
|
|
||||||
|
@ -208,7 +208,6 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
|
|||||||
|
|
||||||
wndconfig.width = width;
|
wndconfig.width = width;
|
||||||
wndconfig.height = height;
|
wndconfig.height = height;
|
||||||
wndconfig.title = title;
|
|
||||||
ctxconfig.share = (_GLFWwindow*) share;
|
ctxconfig.share = (_GLFWwindow*) share;
|
||||||
|
|
||||||
if (!_glfwIsValidContextConfig(&ctxconfig))
|
if (!_glfwIsValidContextConfig(&ctxconfig))
|
||||||
|
@ -754,13 +754,13 @@ static GLFWbool createNativeWindow(_GLFWwindow* window,
|
|||||||
const char* resourceName = getenv("RESOURCE_NAME");
|
const char* resourceName = getenv("RESOURCE_NAME");
|
||||||
if (resourceName && strlen(resourceName))
|
if (resourceName && strlen(resourceName))
|
||||||
hint->res_name = (char*) resourceName;
|
hint->res_name = (char*) resourceName;
|
||||||
else if (strlen(wndconfig->title))
|
else if (strlen(window->title))
|
||||||
hint->res_name = (char*) wndconfig->title;
|
hint->res_name = (char*) window->title;
|
||||||
else
|
else
|
||||||
hint->res_name = (char*) "glfw-application";
|
hint->res_name = (char*) "glfw-application";
|
||||||
|
|
||||||
if (strlen(wndconfig->title))
|
if (strlen(window->title))
|
||||||
hint->res_class = (char*) wndconfig->title;
|
hint->res_class = (char*) window->title;
|
||||||
else
|
else
|
||||||
hint->res_class = (char*) "GLFW-Application";
|
hint->res_class = (char*) "GLFW-Application";
|
||||||
}
|
}
|
||||||
@ -780,7 +780,7 @@ static GLFWbool createNativeWindow(_GLFWwindow* window,
|
|||||||
if (_glfw.x11.im)
|
if (_glfw.x11.im)
|
||||||
_glfwCreateInputContextX11(window);
|
_glfwCreateInputContextX11(window);
|
||||||
|
|
||||||
_glfwSetWindowTitleX11(window, wndconfig->title);
|
_glfwSetWindowTitleX11(window, window->title);
|
||||||
_glfwGetWindowPosX11(window, &window->x11.xpos, &window->x11.ypos);
|
_glfwGetWindowPosX11(window, &window->x11.xpos, &window->x11.ypos);
|
||||||
_glfwGetWindowSizeX11(window, &window->x11.width, &window->x11.height);
|
_glfwGetWindowSizeX11(window, &window->x11.width, &window->x11.height);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user