From f0e03e52a31a7badad4f3c4e8ba2122a8aef87a4 Mon Sep 17 00:00:00 2001 From: allusive-dev Date: Sun, 5 Nov 2023 08:37:47 +1100 Subject: changed 'inactive-opacity-exclude' to 'inactive-exclude', updated sample config, inactive-exclude now cancels inactive-dim --- src/config_libconfig.c | 2 +- src/options.c | 2 +- src/win.c | 14 +++++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/config_libconfig.c b/src/config_libconfig.c index 57a3bf7..1b81a50 100644 --- a/src/config_libconfig.c +++ b/src/config_libconfig.c @@ -589,7 +589,7 @@ char *parse_config_libconfig(options_t *opt, const char *config_file, bool *shad // active opacity exclude parse_cfg_condlst(&cfg, &opt->active_opacity_blacklist, "active-opacity-exclude"); // inactive opacity exclude - parse_cfg_condlst(&cfg, &opt->inactive_opacity_blacklist, "inactive-opacity-exclude"); + parse_cfg_condlst(&cfg, &opt->inactive_opacity_blacklist, "inactive-exclude"); // corners-rule parse_cfg_condlst_corner(opt, &cfg, "corners-rule"); // blur-rule diff --git a/src/options.c b/src/options.c index 6bdfa0e..c98a77e 100644 --- a/src/options.c +++ b/src/options.c @@ -189,7 +189,7 @@ static const struct picom_option picom_options[] = { {"animation-unmap-exclude", required_argument, 815, NULL, "animation unmap exclude list"}, {"wm-support", required_argument, 816, NULL, "Set specific window manager support"}, {"active-opacity-exclude", required_argument, 817, NULL, "Exclude windows from being affected by active opacity"}, - {"inactive-opacity-exclude", required_argument, 818, NULL, "Exclude windows from being affected by inactive opacity"}, + {"inactive-exclude", required_argument, 818, NULL, "Exclude windows from being affected by inactive opacity"}, }; // clang-format on diff --git a/src/win.c b/src/win.c index 8c85449..1392020 100644 --- a/src/win.c +++ b/src/win.c @@ -1212,13 +1212,21 @@ bool win_should_dim(session_t *ps, const struct managed_win *w) { if (ps->o.support_for_wm == WM_SUPPORT_DWM) { if (ps->o.inactive_dim > 0 && !win_is_focused_raw(ps, w)) { - return true; + if (c2_match(ps, w, ps->o.inactive_opacity_blacklist, NULL)) { + return false; + } else { + return true; + } } else { return false; } } else { - if (ps->o.inactive_dim > 0 && !w->focused) { - return true; + if (ps->o.inactive_dim > 0 && !win_is_focused_raw(ps, w)) { + if (c2_match(ps, w, ps->o.inactive_opacity_blacklist, NULL)) { + return false; + } else { + return true; + } } else { return false; } -- cgit v1.2.3