another fix, call lt->arrange() in togglebar only 37e062b0
Anselm R. Garbe · 2007-05-15 13:36 3 file(s) · +6 −5
config.mk +2 −2
17 17
# flags
18 18
CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\"
19 19
LDFLAGS = ${LIBS}
20 -
#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
21 -
#LDFLAGS = -g ${LIBS}
20 +
CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
21 +
LDFLAGS = -g ${LIBS}
22 22
23 23
# Solaris
24 24
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
layout.c +1 −0
220 220
togglebar(const char *arg) {
221 221
	bpos = (bpos == BarOff) ? BARPOS : BarOff;
222 222
	updatebarpos();
223 +
	lt->arrange();
223 224
}
224 225
225 226
void
main.c +3 −3
190 190
	wa.override_redirect = 1;
191 191
	wa.background_pixmap = ParentRelative;
192 192
	wa.event_mask = ButtonPressMask | ExposureMask;
193 -
	barwin = XCreateWindow(dpy, root, sx, sy - bh, sw, bh, 0,
193 +
	barwin = XCreateWindow(dpy, root, sx, sy, sw, bh, 0,
194 194
			DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen),
195 195
			CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
196 196
	XDefineCursor(dpy, barwin, cursor[CurNormal]);
232 232
	wah = sh;
233 233
	waw = sw;
234 234
	switch(bpos) {
235 -
	case BarTop:
235 +
	default:
236 236
		wah -= bh;
237 237
		way += bh;
238 238
		XMoveWindow(dpy, barwin, sx, sy);
243 243
		break;
244 244
	case BarOff:
245 245
		XMoveWindow(dpy, barwin, sx, sy - bh);
246 +
		break;
246 247
	}
247 -
	lt->arrange();
248 248
}
249 249
250 250
/* There's no way to check accesses to destroyed windows, thus those cases are