| @@ -30,7 +30,7 @@ |
| 30 | 30 | | #include <X11/Xatom.h> |
| 31 | 31 | | #include <X11/Xresource.h> |
| 32 | 32 | | |
| 33 | | − | extern size_t get_win_title(char *, int); |
| 33 | + | extern size_t get_win_title(unsigned char *, int); |
| 34 | 34 | | |
| 35 | 35 | | #if HAVE_LIBFONTS |
| 36 | 36 | | #include "utf8.h" |
| @@ -170,6 +170,7 @@ void win_init(win_t *win) |
| 170 | 170 | | INIT_ATOM_(_NET_WM_STATE); |
| 171 | 171 | | INIT_ATOM_(_NET_WM_PID); |
| 172 | 172 | | INIT_ATOM_(_NET_WM_STATE_FULLSCREEN); |
| 173 | + | INIT_ATOM_(UTF8_STRING); |
| 173 | 174 | | } |
| 174 | 175 | | |
| 175 | 176 | | void win_open(win_t *win) |
| @@ -504,18 +505,16 @@ void win_draw_rect(win_t *win, int x, int y, int w, int h, bool fill, int lw, |
| 504 | 505 | | |
| 505 | 506 | | void win_set_title(win_t *win) |
| 506 | 507 | | { |
| 507 | | − | char title[512]; |
| 508 | + | unsigned char title[512]; |
| 508 | 509 | | size_t len; |
| 509 | 510 | | |
| 510 | 511 | | if ((len = get_win_title(title, ARRLEN(title))) <= 0) |
| 511 | 512 | | return; |
| 512 | 513 | | |
| 513 | 514 | | XChangeProperty(win->env.dpy, win->xwin, atoms[ATOM__NET_WM_NAME], |
| 514 | | − | XInternAtom(win->env.dpy, "UTF8_STRING", False), 8, |
| 515 | | − | PropModeReplace, (unsigned char *) title, len); |
| 515 | + | atoms[ATOM_UTF8_STRING], 8, PropModeReplace, title, len); |
| 516 | 516 | | XChangeProperty(win->env.dpy, win->xwin, atoms[ATOM__NET_WM_ICON_NAME], |
| 517 | | − | XInternAtom(win->env.dpy, "UTF8_STRING", False), 8, |
| 518 | | − | PropModeReplace, (unsigned char *) title, len); |
| 517 | + | atoms[ATOM_UTF8_STRING], 8, PropModeReplace, title, len); |
| 519 | 518 | | } |
| 520 | 519 | | |
| 521 | 520 | | void win_set_cursor(win_t *win, cursor_t cursor) |