Wayland: Move window title cloning to creation

(cherry picked from commit c1ecd4673e)
This commit is contained in:
Camilla Löwy 2021-12-27 18:16:37 +01:00
parent ed785a2c79
commit eb6fc17746

View File

@ -754,6 +754,7 @@ static GLFWbool createSurface(_GLFWwindow* window,
window->wl.width = wndconfig->width;
window->wl.height = wndconfig->height;
window->wl.scale = 1;
window->wl.title = _glfw_strdup(wndconfig->title);
window->wl.transparent = fbconfig->transparent;
if (!window->wl.transparent)
@ -943,9 +944,6 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
}
}
if (wndconfig->title)
window->wl.title = _glfw_strdup(wndconfig->title);
window->wl.currentCursor = NULL;
window->wl.monitors = calloc(1, sizeof(_GLFWmonitor*));