From b0e3865562da8cade5bcbb56f2e71e9d7eb41336 Mon Sep 17 00:00:00 2001 From: Tobias Umbach Date: Thu, 20 Sep 2018 23:59:37 +0200 Subject: [PATCH] Don't include NUL byte in _NET_WM_NAME (#658) > The contents of the property are not required to be null-terminated; > any terminating null should not be included in text_prop.nitems. https://tronche.com/gui/x/xlib/ICC/client-to-window-manager/XmbTextPropertyToTextList.html --- CHANGELOG.md | 2 ++ src/platform/linux/x11/window.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35467e4e..418b3ecc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,12 @@ # Unreleased + - On Wayland, windows will use server-side decorations when available. - Added support for F16-F24 keys. - Fixed graphical glitches when resizing on Wayland. - On Windows, fix freezes when performing certain actions after a window resize has been triggered. Reintroduces some visual artifacts when resizing. - Updated window manager hints under X11 to v1.5 of [Extended Window Manager Hints](https://specifications.freedesktop.org/wm-spec/wm-spec-1.5.html#idm140200472629520). - Added `WindowBuilderExt::with_gtk_theme_variant` to X11-specific `WindowBuilder` functions. +- Fixed UTF8 handling bug in X11 `set_title` function. # Version 0.17.2 (2018-08-19) diff --git a/src/platform/linux/x11/window.rs b/src/platform/linux/x11/window.rs index 67d60a9e..6e73aca0 100644 --- a/src/platform/linux/x11/window.rs +++ b/src/platform/linux/x11/window.rs @@ -600,7 +600,7 @@ impl UnownedWindow { wm_name_atom, utf8_atom, util::PropMode::Replace, - title.as_bytes_with_nul(), + title.as_bytes(), ) } }