Wmfs: Optimization & cosmetic #2

This commit is contained in:
Martin Duquesnoy
2011-06-04 20:57:42 +02:00
parent 87b558b4b9
commit 9e78421e2e
4 changed files with 5 additions and 6 deletions

View File

@@ -313,7 +313,7 @@ frame_update(Client *c)
if(TBARH - BORDH)
barwin_draw_text(c->titlebar,
(c->frame_geo.width >> 1) - (textw(c->title) >> 1),
((font->height - font->descent) + ((TBARH - font->height) / 2)),
((font->height - font->descent) + ((TBARH - font->height) >> 1)),
c->title);
return;

View File

@@ -555,7 +555,7 @@ mirror(int screen, Bool horizontal)
else
cgeo.width = tilesize;
if((i + nmaster) % 2)
if((i + nmaster) & 1)
{
isp = 1;

View File

@@ -84,12 +84,12 @@
#define MAXH DisplayHeight(dpy, DefaultScreen(dpy))
#define MAXW DisplayWidth(dpy, DefaultScreen(dpy))
#define INFOBARH ((conf.bars.height > 0) ? conf.bars.height : (font->height * 1.5))
#define FHINFOBAR ((font->height - font->descent) + (INFOBARH - font->height) / 2)
#define FHINFOBAR ((font->height - font->descent) + (((int)INFOBARH - font->height) >> 1))
#define SHADH (1)
#define BORDH conf.client.borderheight
#define TBARH ((conf.titlebar.height < BORDH) ? BORDH : conf.titlebar.height)
#define RESHW (6 * (BORDH))
#define BUTTONWH (TBARH / 2)
#define BUTTONWH (TBARH >> 1)
#define DEF_CONF ".config/wmfs/wmfsrc"
#define DEF_STATUS ".config/wmfs/status.sh"
#define PAD conf.pad
@@ -109,7 +109,7 @@
#define CHECK(x) if(!(x)) return
#define LEN(x) (sizeof(x) / sizeof((x)[0]))
#define MAXCLIST (64)
#define RPOS(x) (x % 2 ? x - 1 : x + 1)
#define RPOS(x) (x & 1 ? x - 1 : x + 1)
#define LDIR(x) (x < Top)
#define FLAGAPPLY(v, b, f) ((b) ? (v |= (f)) : (v &= ~(f)))

1
wmfsrc
View File

@@ -9,7 +9,6 @@
[misc]
font = "dejavu-10"
raisefocus = true
raiseswitch = false
focus_follow_mouse = true
focus_follow_movement = false
opacity = 255