transparency rule support

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
MATSUU Takuto 2008-01-25 23:48:24 +01:00 committed by Julien Danjou
parent c22430a115
commit 363cefefee
4 changed files with 7 additions and 0 deletions

View File

@ -512,6 +512,7 @@ rules
screen = <integer>
icon = <image>
not_master = <boolean>
opacity = <float>
}
}
keys

View File

@ -285,6 +285,9 @@ client_manage(Window w, XWindowAttributes *wa, int screen)
client_setfloating(c, False);
break;
}
if(rule->opacity >= 0.0f)
window_settrans(c->win, rule->opacity);
}
else
move_client_to_screen(c, screen, True);

View File

@ -644,6 +644,7 @@ config_parse(const char *confpatharg)
CFG_STR((char *) "float", (char *) "auto", CFGF_NONE),
CFG_INT((char *) "screen", RULE_NOSCREEN, CFGF_NONE),
CFG_BOOL((char *) "not_master", cfg_false, CFGF_NONE),
CFG_FLOAT((char *) "opacity", -1.0f, CFGF_NONE),
CFG_END()
};
static cfg_opt_t rules_opts[] =
@ -756,6 +757,7 @@ config_parse(const char *confpatharg)
rule->isfloating = rules_get_float_from_str(cfg_getstr(cfgsectmp, "float"));
rule->screen = cfg_getint(cfgsectmp, "screen");
rule->not_master = cfg_getbool(cfgsectmp, "not_master");
rule->opacity = cfg_getfloat(cfgsectmp, "opacity");
if(rule->screen >= globalconf.nscreen)
rule->screen = 0;

View File

@ -61,6 +61,7 @@ struct Rule
int screen;
RuleFloat isfloating;
Bool not_master;
double opacity;
regex_t *prop_r;
regex_t *tags_r;
regex_t *xpropval_r;