[ALL] Remove barborder feature -.-

This commit is contained in:
Martin Duquesnoy 2008-10-05 20:37:41 +02:00
parent 7ba40c2db5
commit 148f61a7ff
4 changed files with 9 additions and 17 deletions

View File

@ -137,7 +137,6 @@ init_conf(void)
static cfg_opt_t misc_opts[] =
{
CFG_STR("bar_position", "top", CFGF_NONE),
CFG_BOOL("barborder", cfg_false, CFGF_NONE),
CFG_BOOL("raisefocus", cfg_false, CFGF_NONE),
CFG_BOOL("raiseswitch", cfg_true, CFGF_NONE),
CFG_INT("border_height", 1, CFGF_NONE),
@ -284,7 +283,6 @@ init_conf(void)
/* misc */
conf.raisefocus = cfg_getbool(cfg_misc, "raisefocus");
conf.barborder = cfg_getbool(cfg_misc, "barborder");
conf.raiseswitch = cfg_getbool(cfg_misc, "raiseswitch");
conf.borderheight = cfg_getint(cfg_misc, "border_height");
conf.ttbarheight = cfg_getint(cfg_misc, "titlebar_height");

View File

@ -106,8 +106,8 @@ maxlayout(void)
c->oh = c->h;
moveresize(c, 0, (conf.ttbarheight + ((conf.bartop) ? barheight : 0)),
(mw-(conf.borderheight * 2)),
(mh-(conf.borderheight * 2) - conf.ttbarheight - barheight), False);
(mw - (conf.borderheight * 2)),
(mh - (conf.borderheight * 2) - conf.ttbarheight - barheight), False);
}
return;
@ -201,7 +201,7 @@ tile(void)
/* remainder */
if(i + 1 == (n < nm ? n : nm))
h = (mht - hh*i) -
((conf.bartop) ? barheight : 0);
((conf.bartop) ? barheight: 0);
h -= bord + conf.ttbarheight;
}
/* TILE CLIENT */
@ -254,9 +254,9 @@ uicb_togglemax(uicb_t cmd)
{
sel->ox = sel->x; sel->oy = sel->y;
sel->ow = sel->w; sel->oh = sel->h;
moveresize(sel, 0, (conf.ttbarheight + ((conf.bartop) ? barheight : 0)),
(mw-(conf.borderheight * 2)),
(mh-(conf.borderheight * 2)- conf.ttbarheight - barheight), False);
moveresize(sel, 0, (conf.ttbarheight + ((conf.bartop) ? barheight: 0)),
(mw - (conf.borderheight * 2)),
(mh - (conf.borderheight * 2)- conf.ttbarheight - barheight), False);
raiseclient(sel);
sel->max = True;
}

11
wmfs.c
View File

@ -398,20 +398,15 @@ init(void)
XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &at);
/* INIT BAR / BUTTON */
bary = (conf.bartop) ? 0 : mh - barheight - conf.barborder;
bary = (conf.bartop) ? 0 : mh - barheight;
dr = XCreatePixmap(dpy, root, DisplayWidth(dpy, screen), barheight, DefaultDepth(dpy, screen));
at.override_redirect = 1;
at.background_pixmap = ParentRelative;
at.event_mask = ButtonPressMask | ExposureMask;
bar = XCreateWindow(dpy, root, 0, bary, mw - conf.barborder*2, barheight, 0, DefaultDepth(dpy, screen),
bar = XCreateWindow(dpy, root, 0, bary, mw, barheight, 0, DefaultDepth(dpy, screen),
CopyFromParent, DefaultVisual(dpy, screen),
CWOverrideRedirect | CWBackPixmap | CWEventMask, &at);
XMapRaised(dpy, bar);
if(conf.barborder)
{
XSetWindowBorder(dpy, bar, conf.colors.borderfocus);
XSetWindowBorderWidth(dpy, bar, 1);
}
strcpy(bartext, WMFS_VERSION);
updatebutton(False);
updatebar();
@ -864,7 +859,7 @@ uicb_togglebarpos(uicb_t cmd)
if(conf.bartop)
bary = 0;
else
bary = mh - barheight - conf.barborder;
bary = mh - barheight;
XMoveWindow(dpy, bar, 0, bary);
updatebar();
for(i = 0; i < conf.nbutton; ++i)

1
wmfs.h
View File

@ -136,7 +136,6 @@ typedef struct
bool raisefocus;
bool raiseswitch;
bool bartop;
bool barborder;
int borderheight;
int ttbarheight;
struct