initialize prevtags in setup, now users can setup which seltags should be selectedin config.h 667da18b
Anselm R. Garbe · 2007-11-10 19:31 1 file(s) · +5 −4
dwm.c +5 −4
233 233
/* configuration, allows nested code to access above variables */
234 234
#include "config.h"
235 235
236 -
Bool prevtags[LENGTH(tags)] = {[0] = True};
236 +
Bool prevtags[LENGTH(tags)];
237 237
238 238
/* function implementations */
239 239
void
1467 1467
	grabkeys();
1468 1468
1469 1469
	/* init tags */
1470 +
	memcpy(prevtags, seltags, sizeof seltags);
1470 1471
	compileregs();
1471 1472
1472 1473
	/* init appearance */
1849 1850
1850 1851
void
1851 1852
viewprevtag(const char *arg) {
1852 -
	static Bool tmptags[sizeof tags / sizeof tags[0]];
1853 +
	static Bool tmp[LENGTH(tags)];
1853 1854
1854 -
	memcpy(tmptags, seltags, sizeof seltags);
1855 +
	memcpy(tmp, seltags, sizeof seltags);
1855 1856
	memcpy(seltags, prevtags, sizeof seltags);
1856 -
	memcpy(prevtags, tmptags, sizeof seltags);
1857 +
	memcpy(prevtags, tmp, sizeof seltags);
1857 1858
	arrange();
1858 1859
}
1859 1860