Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Jan 27, 2020
1 parent 2e3037c commit 8f1ec05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion glfw/wl_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,8 @@ void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
window->wl.title = _glfw_strdup(title);
// Wayland cannot handle requests larger than ~8200 bytes. Sending
// on causes an abort(). Since titles this large are meaningless anyway
// ensure they do not happen.
// ensure they do not happen. One should really truncate ensuring valid UTF-8
// but I cant be bothered.
if (title && strnlen(title, 2048) >= 2048) window->wl.title[2048] = 0;
if (window->wl.xdg.toplevel)
xdg_toplevel_set_title(window->wl.xdg.toplevel, window->wl.title);
Expand Down

0 comments on commit 8f1ec05

Please sign in to comment.