Krolyxon
Commit aac28cc

Branches

Refs →

nsxivaac28cc

Fixed non-ASCII characters in window bar, issue #88

Author
Bert Münnich
Date
2013-04-06 14:04 +0200
Parent
264a345
Commit
aac28cce7ad3300a9a1e6265d6dd9e30b1d223e9

+6 −10

2 files changed

  1. M Makefile +1 −1
  2. M window.c +5 −9
M Makefile View
@@ -1,4 +1,4 @@
1−VERSION = git-20130402
1+VERSION = git-20130406
22
33 PREFIX = /usr/local
44 MANPREFIX = $(PREFIX)/share/man
M window.c View
@@ -119,6 +119,9 @@ void win_init(win_t *win)
119119 e->cmap = DefaultColormap(e->dpy, e->scr);
120120 e->depth = DefaultDepth(e->dpy, e->scr);
121121
122+ if (setlocale(LC_CTYPE, "") == NULL || XSupportsLocale() == 0)
123+ warn("no locale support");
124+
122125 win_init_font(e->dpy, BAR_FONT);
123126
124127 win->white = WhitePixel(e->dpy, e->scr);
@@ -135,9 +138,6 @@ void win_init(win_t *win)
135138 /* actual min/max values set in win_update_sizehints() */
136139 win->sizehints.flags |= PMinSize | PMaxSize;
137140
138− if (setlocale(LC_CTYPE, "") == NULL || XSupportsLocale() == 0)
139− warn("no locale support");
140−
141141 wm_delete_win = XInternAtom(e->dpy, "WM_DELETE_WINDOW", False);
142142 }
143143
@@ -148,7 +148,7 @@ void win_update_sizehints(win_t *win)
148148
149149 if ((win->sizehints.flags & USSize) != 0) {
150150 win->sizehints.width = win->w;
151− win->sizehints.height = win->h;
151+ win->sizehints.height = win->h + win->bar.h;
152152 }
153153 if ((win->sizehints.flags & USPosition) != 0) {
154154 win->sizehints.x = win->x;
@@ -243,11 +243,7 @@ void win_open(win_t *win)
243243
244244 XSetWMProtocols(e->dpy, win->xwin, &wm_delete_win, 1);
245245
246− if (!options->hide_bar) {
247− win->bar.h = barheight;
248− win->h -= win->bar.h;
249− }
250−
246+ win->h -= win->bar.h;
251247 win_update_sizehints(win);
252248
253249 XMapWindow(e->dpy, win->xwin);