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> font = <font>
new_become_master = <boolean> new_become_master = <boolean>
new_get_focus = <boolean> new_get_focus = <boolean>
opacity_unfocused = <integer>
resize_hints = <boolean> resize_hints = <boolean>
sloppy_focus = <boolean> sloppy_focus = <boolean>
sloppy_focus_raise = <boolean> sloppy_focus_raise = <boolean>

View File

@ -147,6 +147,8 @@ client_updatetitle(Client *c)
static void static void
client_unfocus(Client *c) 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, XSetWindowBorder(globalconf.display, c->win,
globalconf.screens[c->screen].colors_normal[ColBorder].pixel); globalconf.screens[c->screen].colors_normal[ColBorder].pixel);
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS); 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 */ /* save sel in focus history */
focus_add_client(c); 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, XSetWindowBorder(globalconf.display, c->win,
globalconf.screens[screen].colors_selected[ColBorder].pixel); globalconf.screens[screen].colors_selected[ColBorder].pixel);
XSetInputFocus(globalconf.display, c->win, RevertToPointerRoot, CurrentTime); 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_become_master", cfg_true, CFGF_NONE),
CFG_BOOL((char *) "new_get_focus", cfg_true, CFGF_NONE), CFG_BOOL((char *) "new_get_focus", cfg_true, CFGF_NONE),
CFG_STR((char *) "font", (char *) "vera-10", CFGF_NONE), CFG_STR((char *) "font", (char *) "vera-10", CFGF_NONE),
CFG_INT((char *) "opacity_unfocused", -1, CFGF_NONE),
CFG_END() CFG_END()
}; };
cfg_opt_t colors_opts[] = 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->sloppy_focus_raise = cfg_getbool(cfg_general, "sloppy_focus_raise");
virtscreen->new_become_master = cfg_getbool(cfg_general, "new_become_master"); virtscreen->new_become_master = cfg_getbool(cfg_general, "new_become_master");
virtscreen->new_get_focus = cfg_getbool(cfg_general, "new_get_focus"); 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, virtscreen->font = XftFontOpenName(globalconf.display,
phys_screen, phys_screen,
cfg_getstr(cfg_general, "font")); cfg_getstr(cfg_general, "font"));

View File

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