mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 10:41:58 +02:00
...
This commit is contained in:
3
glfw/wl_window.c
vendored
3
glfw/wl_window.c
vendored
@@ -960,7 +960,8 @@ void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
|
|||||||
window->wl.title = _glfw_strdup(title);
|
window->wl.title = _glfw_strdup(title);
|
||||||
// Wayland cannot handle requests larger than ~8200 bytes. Sending
|
// Wayland cannot handle requests larger than ~8200 bytes. Sending
|
||||||
// on causes an abort(). Since titles this large are meaningless anyway
|
// 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 (title && strnlen(title, 2048) >= 2048) window->wl.title[2048] = 0;
|
||||||
if (window->wl.xdg.toplevel)
|
if (window->wl.xdg.toplevel)
|
||||||
xdg_toplevel_set_title(window->wl.xdg.toplevel, window->wl.title);
|
xdg_toplevel_set_title(window->wl.xdg.toplevel, window->wl.title);
|
||||||
|
|||||||
Reference in New Issue
Block a user