all,layout: Add layout right separation and surface structure
This commit is contained in:
parent
add0f0187b
commit
38dfecf837
@ -141,8 +141,6 @@ updatebar(void)
|
||||
void
|
||||
uicb_togglebarpos(uicb_t cmd)
|
||||
{
|
||||
int i;
|
||||
|
||||
conf.bartop = !conf.bartop;
|
||||
if(conf.bartop)
|
||||
sgeo.y = conf.titlebar.pos ? barheight : barheight + conf.titlebar.height;
|
||||
@ -155,11 +153,6 @@ uicb_togglebarpos(uicb_t cmd)
|
||||
bary = mh - barheight;
|
||||
bar_moveresize(bar, 0, bary, mw, barheight);
|
||||
updatebar();
|
||||
for(i = 0; i < conf.nbutton; ++i)
|
||||
XUnmapWindow(dpy, conf.barbutton[i].bw->win);
|
||||
for(i = 0; i < conf.nbutton; ++i)
|
||||
XMapWindow(dpy, conf.barbutton[i].bw->win);
|
||||
|
||||
arrange();
|
||||
|
||||
return;
|
||||
|
||||
10
src/draw.c
10
src/draw.c
@ -78,7 +78,7 @@ draw_taglist(Drawable dr)
|
||||
((i+1 == seltag) ? conf.colors.tagselfg : conf.colors.text),
|
||||
((i+1 == seltag) ? conf.colors.tagselbg : conf.colors.bar), PAD, buf[i]);
|
||||
|
||||
/* Draw the tag border */
|
||||
/* Draw the tag separation */
|
||||
draw_rectangle(dr, taglen[i] + textw(buf[i]) + PAD/2,
|
||||
0, conf.tagbordwidth, barheight, conf.colors.tagbord);
|
||||
|
||||
@ -92,11 +92,17 @@ draw_taglist(Drawable dr)
|
||||
void
|
||||
draw_layout(void)
|
||||
{
|
||||
draw_text(bar->dr, taglen[conf.ntag] + 1, fonth,
|
||||
/* Draw layout name / symbol */
|
||||
draw_text(bar->dr, taglen[conf.ntag], fonth,
|
||||
conf.colors.layout_fg,
|
||||
conf.colors.layout_bg,
|
||||
2, tags[seltag].layout.symbol);
|
||||
|
||||
/* Draw right separation */
|
||||
draw_rectangle(bar->dr,
|
||||
taglen[conf.ntag] + textw(tags[seltag].layout.symbol) + PAD/2,
|
||||
0, conf.tagbordwidth, barheight, conf.colors.tagbord);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -112,17 +112,18 @@ typedef struct
|
||||
uicb_t cmd;
|
||||
} MouseBinding;
|
||||
|
||||
/* Bar Button */
|
||||
/* Surface \o/ */
|
||||
typedef struct
|
||||
{
|
||||
char *content;
|
||||
BarWindow *bw;
|
||||
char *fg_color;
|
||||
int bg_color;
|
||||
uint x;
|
||||
int nmousesec;
|
||||
MouseBinding mouse[NBUTTON];
|
||||
} BarButton;
|
||||
char *text;
|
||||
Drawable dr;
|
||||
Window win;
|
||||
XRectangle geo;
|
||||
MouseBinding mousebind[10];
|
||||
int nmouse;
|
||||
char *fg;
|
||||
uint bg;
|
||||
} Surface;
|
||||
|
||||
/* Layout Structure */
|
||||
typedef struct
|
||||
@ -191,7 +192,6 @@ typedef struct
|
||||
} titlebar;
|
||||
Tag tag[MAXTAG];
|
||||
Layout layout[MAXLAYOUT];
|
||||
BarButton *barbutton;
|
||||
int ntag;
|
||||
int nkeybind;
|
||||
int nbutton;
|
||||
|
||||
@ -87,18 +87,12 @@ errorhandlerstart(Display *d, XErrorEvent *event)
|
||||
void
|
||||
quit(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Exiting WMFS :'( */
|
||||
XftFontClose(dpy, xftfont);
|
||||
XFreeCursor(dpy, cursor[CurNormal]);
|
||||
XFreeCursor(dpy, cursor[CurMove]);
|
||||
XFreeCursor(dpy, cursor[CurResize]);
|
||||
bar_delete(bar);
|
||||
if(conf.nbutton)
|
||||
for(i = 0; i < conf.nbutton; ++i)
|
||||
bar_delete(conf.barbutton[i].bw);
|
||||
efree(conf.barbutton);
|
||||
efree(keys);
|
||||
efree(conf.titlebar.mouse);
|
||||
efree(conf.client.mouse);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user