Conf: Buttons as indicators of client mode (Feature #33)
This commit is contained in:
parent
06a9c44792
commit
c350bb45d0
@ -264,6 +264,15 @@ conf_client_section(char *src)
|
||||
|
||||
cfg_set_sauv(tmp2);
|
||||
|
||||
tmp3 = get_opt(tmp2, "none", "flags").str;
|
||||
conf.titlebar.button[i].flags = 0;
|
||||
if(strstr(tmp3, "free"))
|
||||
conf.titlebar.button[i].flags |= FreeFlag;
|
||||
if(strstr(tmp3, "max"))
|
||||
conf.titlebar.button[i].flags |= MaxFlag;
|
||||
if(strstr(tmp3, "tile"))
|
||||
conf.titlebar.button[i].flags |= TileFlag;
|
||||
|
||||
/* Multi mouse section */
|
||||
if((conf.titlebar.button[i].nmouse = get_size_sec(tmp2, "mouse")))
|
||||
{
|
||||
|
||||
10
src/frame.c
10
src/frame.c
@ -220,6 +220,13 @@ frame_update(Client *c)
|
||||
{
|
||||
XSetWindowBackground(dpy, c->button[i], c->colors.frame);
|
||||
XClearWindow(dpy, c->button[i]);
|
||||
|
||||
if((!conf.titlebar.button[i].flags)
|
||||
|| ((conf.titlebar.button[i].flags & FreeFlag) && (c->flags & FreeFlag))
|
||||
|| ((conf.titlebar.button[i].flags & MaxFlag) && (c->flags & MaxFlag))
|
||||
|| ((conf.titlebar.button[i].flags & TileFlag) && (c->flags & TileFlag)))
|
||||
{
|
||||
|
||||
XSetWindowBorder(dpy, c->button[i], getcolor(c->colors.fg));
|
||||
|
||||
/* Button's lines */
|
||||
@ -231,6 +238,9 @@ frame_update(Client *c)
|
||||
conf.titlebar.button[i].nlines);
|
||||
}
|
||||
}
|
||||
else
|
||||
XSetWindowBorder(dpy, c->button[i], c->colors.frame);
|
||||
}
|
||||
}
|
||||
|
||||
barwin_refresh(c->titlebar);
|
||||
|
||||
@ -303,6 +303,7 @@ typedef struct
|
||||
XSegment *linecoord;
|
||||
int nlines;
|
||||
int nmouse;
|
||||
uint flags;
|
||||
} Button;
|
||||
|
||||
/* Alias struct */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user