|
|
|
@ -75,7 +75,6 @@ static void updatekeys(); |
|
|
|
|
|
|
|
|
|
/* variables */ |
|
|
|
|
static int screen; |
|
|
|
|
static int wx, wy, ww, wh; |
|
|
|
|
static void (*handler[LASTEvent]) (XEvent *) = { |
|
|
|
|
[ButtonPress] = buttonpress, |
|
|
|
|
[ButtonRelease] = buttonrelease, |
|
|
|
@ -317,10 +316,20 @@ setup(void) { |
|
|
|
|
initfont(font); |
|
|
|
|
|
|
|
|
|
/* init appearance */ |
|
|
|
|
if (!ww) |
|
|
|
|
ww = DisplayWidth(dpy, screen); |
|
|
|
|
wh = 200; |
|
|
|
|
wx = 0; |
|
|
|
|
wy = DisplayHeight(dpy, screen) - wh; |
|
|
|
|
if (ww < 0) |
|
|
|
|
ww = DisplayWidth(dpy, screen) / (ww * -1); |
|
|
|
|
|
|
|
|
|
if (wh < 0) |
|
|
|
|
wh = DisplayHeight(dpy, screen) / (wh * -1);
|
|
|
|
|
|
|
|
|
|
if (wy < 0) |
|
|
|
|
wy = DisplayHeight(dpy, screen) + wy; |
|
|
|
|
|
|
|
|
|
if (wx < 0) |
|
|
|
|
wx = DisplayWidth(dpy, screen) + wx; |
|
|
|
|
|
|
|
|
|
dc.norm[ColBG] = getcolor(normbgcolor); |
|
|
|
|
dc.norm[ColFG] = getcolor(normfgcolor); |
|
|
|
|
dc.press[ColBG] = getcolor(pressbgcolor); |
|
|
|
|