new directive opacity_focused=<int>

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Steffen Schulz 2008-03-23 20:36:55 +01:00 committed by Julien Danjou
parent 4e73492bee
commit 3b8cf66822
4 changed files with 5 additions and 1 deletions

View File

@ -205,7 +205,7 @@ client_focus(Client *c, int screen, Bool raise)
/* save sel in focus history */
focus_add_client(c);
if(globalconf.screens[c->screen].opacity_unfocused != -1)
window_settrans(c->win, -1);
window_settrans(c->win, globalconf.screens[c->screen].opacity_focused);
XSetWindowBorder(globalconf.display, c->win,
globalconf.screens[screen].styles.focus.border.pixel);
titlebar_update(c);

View File

@ -189,6 +189,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_INT((char *) "opacity_unfocused", -1, CFGF_NONE),
CFG_INT((char *) "opacity_focused", -1, CFGF_NONE),
CFG_STR((char *) "floating_placement", (char *) "smart", CFGF_NONE),
CFG_FLOAT((char *) "mwfact_lower_limit", 0.1, CFGF_NONE),
CFG_FLOAT((char *) "mwfact_upper_limit", 0.9, CFGF_NONE),

View File

@ -340,6 +340,7 @@ config_parse_screen(cfg_t *cfg, int screen)
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->opacity_focused = cfg_getint(cfg_general, "opacity_focused");
virtscreen->floating_placement =
name_func_lookup(cfg_getstr(cfg_general, "floating_placement"),
FloatingPlacementList);

View File

@ -307,6 +307,8 @@ typedef struct
} styles;
/** Transparency of unfocused clients */
int opacity_unfocused;
/** Transparency of focused clients */
int opacity_focused;
/** Tag list */
Tag *tags;
/** Layout list */