mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 22:14:34 +00:00
Wayland: Fix latent bug for glfwGetWindowTitle
This commit is contained in:
parent
85f5a51912
commit
203002ef2c
@ -1845,9 +1845,10 @@ void _glfwDestroyWindowWayland(_GLFWwindow* window)
|
|||||||
|
|
||||||
void _glfwSetWindowTitleWayland(_GLFWwindow* window, const char* title)
|
void _glfwSetWindowTitleWayland(_GLFWwindow* window, const char* title)
|
||||||
{
|
{
|
||||||
if (window->wl.title)
|
char* copy = _glfw_strdup(title);
|
||||||
_glfw_free(window->wl.title);
|
_glfw_free(window->wl.title);
|
||||||
window->wl.title = _glfw_strdup(title);
|
window->wl.title = copy;
|
||||||
|
|
||||||
if (window->wl.xdg.toplevel)
|
if (window->wl.xdg.toplevel)
|
||||||
xdg_toplevel_set_title(window->wl.xdg.toplevel, title);
|
xdg_toplevel_set_title(window->wl.xdg.toplevel, title);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user