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