Add umlaut support for title change.

Thanks Alexander Sedov <alex0player@gmail.com>!
dev
Christoph Lohmann 2013-02-23 21:20:21 +01:00
parent 1b6c6535c1
commit efaf1c2a94
2 changed files with 12 additions and 12 deletions

1
TODO
View File

@ -18,7 +18,6 @@ bugs
* fix shift up/down (shift selection in emacs) * fix shift up/down (shift selection in emacs)
* fix selection paste for xatom STRING * fix selection paste for xatom STRING
* fix umlaut handling in settitle
* fix rows and column definition in fixed geometry * fix rows and column definition in fixed geometry
* fix -e handling * fix -e handling
* remove DEC test sequence when appropriate * remove DEC test sequence when appropriate

23
st.c
View File

@ -1861,12 +1861,9 @@ csireset(void) {
void void
strhandle(void) { strhandle(void) {
char *p = NULL; char *p = NULL;
int i, j; int i, j, narg;
int narg; XTextProperty prop;
/*
* TODO: make this being useful in case of color palette change.
*/
strparse(); strparse();
narg = strescseq.narg; narg = strescseq.narg;
@ -1876,11 +1873,12 @@ strhandle(void) {
case 0: case 0:
case 1: case 1:
case 2: case 2:
/* if(narg > 1) {
* TODO: Handle special chars in string, like umlauts. p += 2;
*/ Xutf8TextListToTextProperty(xw.dpy, &p, 1,
if(narg > 1) XUTF8StringStyle, &prop);
XStoreName(xw.dpy, xw.win, strescseq.args[2]); XSetWMName(xw.dpy, xw.win, &prop);
}
break; break;
case 4: /* color set */ case 4: /* color set */
if(narg < 3) if(narg < 3)
@ -1902,7 +1900,10 @@ strhandle(void) {
} }
break; break;
case 'k': /* old title set compatibility */ case 'k': /* old title set compatibility */
XStoreName(xw.dpy, xw.win, strescseq.buf); p += 1;
Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle,
&prop);
XSetWMName(xw.dpy, xw.win, &prop);
break; break;
case 'P': /* DSC -- Device Control String */ case 'P': /* DSC -- Device Control String */
case '_': /* APC -- Application Program Command */ case '_': /* APC -- Application Program Command */