From 3b8cf66822a814c9567a46c3d141ff5652e10ad1 Mon Sep 17 00:00:00 2001 From: Steffen Schulz Date: Sun, 23 Mar 2008 20:36:55 +0100 Subject: [PATCH] new directive opacity_focused= Signed-off-by: Julien Danjou --- client.c | 2 +- common/configopts.c | 1 + config.c | 1 + structs.h | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/client.c b/client.c index 764039262..14ba89a07 100644 --- a/client.c +++ b/client.c @@ -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); diff --git a/common/configopts.c b/common/configopts.c index 29bc9d7a6..575d218ff 100644 --- a/common/configopts.c +++ b/common/configopts.c @@ -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), diff --git a/config.c b/config.c index 99d8cbfcc..5dedfa917 100644 --- a/config.c +++ b/config.c @@ -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); diff --git a/structs.h b/structs.h index 297a33bff..72f61dbe9 100644 --- a/structs.h +++ b/structs.h @@ -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 */