Skip to content

Commit

Permalink
Add umlaut support for title change.
Browse files Browse the repository at this point in the history
Thanks Alexander Sedov <[email protected]>!
  • Loading branch information
Christoph Lohmann committed Feb 23, 2013
1 parent 1b6c653 commit efaf1c2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
1 change: 0 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ bugs

* fix shift up/down (shift selection in emacs)
* fix selection paste for xatom STRING
* fix umlaut handling in settitle
* fix rows and column definition in fixed geometry
* fix -e handling
* remove DEC test sequence when appropriate
Expand Down
23 changes: 12 additions & 11 deletions st.c
Original file line number Diff line number Diff line change
Expand Up @@ -1861,12 +1861,9 @@ csireset(void) {
void
strhandle(void) {
char *p = NULL;
int i, j;
int narg;
int i, j, narg;
XTextProperty prop;

/*
* TODO: make this being useful in case of color palette change.
*/
strparse();
narg = strescseq.narg;

Expand All @@ -1876,11 +1873,12 @@ strhandle(void) {
case 0:
case 1:
case 2:
/*
* TODO: Handle special chars in string, like umlauts.
*/
if(narg > 1)
XStoreName(xw.dpy, xw.win, strescseq.args[2]);
if(narg > 1) {
p += 2;
Xutf8TextListToTextProperty(xw.dpy, &p, 1,
XUTF8StringStyle, &prop);
XSetWMName(xw.dpy, xw.win, &prop);
}
break;
case 4: /* color set */
if(narg < 3)
Expand All @@ -1902,7 +1900,10 @@ strhandle(void) {
}
break;
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;
case 'P': /* DSC -- Device Control String */
case '_': /* APC -- Application Program Command */
Expand Down

0 comments on commit efaf1c2

Please sign in to comment.