[hackers] [tabbed][PATCH] Use utf8 for window name

From: Nikita Zlobin <nick87720z_AT_gmail.com>
Date: Thu, 4 Jun 2020 13:11:36 +0500

I noticed, that rofi window selector and tint2 panel can't display
tabbed window name correctly, though no problem with e.g. xterm and
urxvt. Strange :/ anyway, no more problem.

================================================================
From ec95771f2434b44a1d3e83135b95118a42fc78fe Mon Sep 17 00:00:00 2001
From: Nikita Zlobin <nick87720z_AT_gmail.com>
Date: Thu, 4 Jun 2020 13:04:22 +0500
Subject: [tabbed][PATCH] Use utf8 for window name
To: hackers_AT_suckless.org

At least some desktop tools (non-mainstream) are in trouble with tabbed
window name. At the moment of try I have only tint2 and rofi. First
just showes intitled, but second - "Invalid encoding". Though xfwm4 has
no problem with compound text names. ---
 tabbed.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tabbed.c b/tabbed.c
index af207c8..4ee4277 100644
--- a/tabbed.c
+++ b/tabbed.c
_AT_@ -1296,8 +1296,8 @@ xsettitle(Window w, const char *str)
 {
        XTextProperty xtp;

- if (XmbTextListToTextProperty(dpy, (char **)&str, 1,
- XCompoundTextStyle, &xtp) == Success) {
+ if (Xutf8TextListToTextProperty(dpy, (char **)&str, 1,
+ XUTF8StringStyle, &xtp) == Success) {
                XSetTextProperty(dpy, w, &xtp, wmatom[WMName]);
                XSetTextProperty(dpy, w, &xtp, XA_WM_NAME);
                XFree(xtp.value);
-- 
2.24.1
=============================================================
Received on Thu Jun 04 2020 - 10:11:36 CEST

This archive was generated by hypermail 2.3.0 : Thu Jun 04 2020 - 10:24:32 CEST