cleaned up cc8b3b99
Connor Lane Smith · 2010-06-30 00:05 1 file(s) · +6 −5
dmenu.c +6 −5
43 43
static void match(char *pattern);
44 44
static void readstdin(void);
45 45
static void run(void);
46 -
static void setup(Bool topbar);
46 +
static void setup(void);
47 47
48 48
#include "config.h"
49 49
#include "draw.h"
63 63
static unsigned long normcol[ColLast];
64 64
static unsigned long selcol[ColLast];
65 65
static Bool running = True;
66 +
static Bool topbar = True;
66 67
static DC dc;
67 68
static Display *dpy;
68 69
static Item *allitems = NULL;  /* first of all items */
475 476
}
476 477
477 478
void
478 -
setup(Bool topbar) {
479 +
setup(void) {
479 480
	int i, j, x, y;
480 481
#if XINERAMA
481 482
	int n;
529 530
	else
530 531
#endif
531 532
	{
532 -
		XGetWindowAttributes(dpy, parent, &pwa);
533 +
		if(!XGetWindowAttributes(dpy, parent, &pwa))
534 +
			eprint("cannot get window attributes");
533 535
		x = 0;
534 536
		y = topbar ? 0 : pwa.height - mh;
535 537
		mw = pwa.width;
553 555
int
554 556
main(int argc, char *argv[]) {
555 557
	unsigned int i;
556 -
	Bool topbar = True;
557 558
558 559
	/* command line args */
559 560
	progname = argv[0];
613 614
	readstdin();
614 615
	running = grabkeyboard();
615 616
616 -
	setup(topbar);
617 +
	setup();
617 618
	drawmenu();
618 619
	XSync(dpy, False);
619 620
	run();