From 148f61a7ff940bd8b4cb1818b6aae96e6caeda9d Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Sun, 5 Oct 2008 20:37:41 +0200 Subject: [PATCH] [ALL] Remove barborder feature -.- --- config.c | 2 -- layout.c | 12 ++++++------ wmfs.c | 11 +++-------- wmfs.h | 1 - 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/config.c b/config.c index 0811080..00be1a0 100644 --- a/config.c +++ b/config.c @@ -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"); diff --git a/layout.c b/layout.c index b7fe18b..1c010ea 100644 --- a/layout.c +++ b/layout.c @@ -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; } diff --git a/wmfs.c b/wmfs.c index 62980da..02db7d1 100644 --- a/wmfs.c +++ b/wmfs.c @@ -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) diff --git a/wmfs.h b/wmfs.h index e1d343d..6cbf631 100644 --- a/wmfs.h +++ b/wmfs.h @@ -136,7 +136,6 @@ typedef struct bool raisefocus; bool raiseswitch; bool bartop; - bool barborder; int borderheight; int ttbarheight; struct