Revert "remove opacity_unfocused"

This commit is contained in:
Julien Danjou 2008-02-04 14:54:50 +01:00
parent b6a62e47ea
commit 06904cfcaa
5 changed files with 9 additions and 0 deletions

View file

@ -338,6 +338,7 @@ screen <integer> [MULTI]
font = <font>
new_become_master = <boolean>
new_get_focus = <boolean>
opacity_unfocused = <integer>
resize_hints = <boolean>
sloppy_focus = <boolean>
sloppy_focus_raise = <boolean>

View file

@ -147,6 +147,8 @@ client_updatetitle(Client *c)
static void
client_unfocus(Client *c)
{
if(globalconf.screens[c->screen].opacity_unfocused != -1)
window_settrans(c->win, globalconf.screens[c->screen].opacity_unfocused);
XSetWindowBorder(globalconf.display, c->win,
globalconf.screens[c->screen].colors_normal[ColBorder].pixel);
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
@ -191,6 +193,8 @@ client_focus(Client *c, int screen, Bool from_mouse)
{
/* save sel in focus history */
focus_add_client(c);
if(globalconf.screens[c->screen].opacity_unfocused != -1)
window_settrans(c->win, globalconf.screens[screen].opacity_unfocused);
XSetWindowBorder(globalconf.display, c->win,
globalconf.screens[screen].colors_selected[ColBorder].pixel);
XSetInputFocus(globalconf.display, c->win, RevertToPointerRoot, CurrentTime);

View file

@ -36,6 +36,7 @@ cfg_opt_t general_opts[] =
CFG_BOOL((char *) "new_become_master", cfg_true, CFGF_NONE),
CFG_BOOL((char *) "new_get_focus", cfg_true, CFGF_NONE),
CFG_STR((char *) "font", (char *) "vera-10", CFGF_NONE),
CFG_INT((char *) "opacity_unfocused", -1, CFGF_NONE),
CFG_END()
};
cfg_opt_t colors_opts[] =

View file

@ -317,6 +317,7 @@ config_parse_screen(cfg_t *cfg, int screen)
virtscreen->sloppy_focus_raise = cfg_getbool(cfg_general, "sloppy_focus_raise");
virtscreen->new_become_master = cfg_getbool(cfg_general, "new_become_master");
virtscreen->new_get_focus = cfg_getbool(cfg_general, "new_get_focus");
virtscreen->opacity_unfocused = cfg_getint(cfg_general, "opacity_unfocused");
virtscreen->font = XftFontOpenName(globalconf.display,
phys_screen,
cfg_getstr(cfg_general, "font"));

View file

@ -270,6 +270,8 @@ typedef struct
XColor colors_selected[ColLast];
/** Urgency colors */
XColor colors_urgent[ColLast];
/** Transparency of unfocused clients */
int opacity_unfocused;
/** Tag list */
Tag *tags;
/** Layout list */