aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorallusive-dev <[email protected]>2023-11-05 08:37:47 +1100
committerallusive-dev <[email protected]>2023-11-05 08:37:47 +1100
commitf0e03e52a31a7badad4f3c4e8ba2122a8aef87a4 (patch)
treea70c1bdc06e77196d1e7e2c3c3fbd3b28c230596 /src
parentMerge branch 'main' of github.com:allusive-dev/picom-allusive (diff)
downloadcompfy-f0e03e52a31a7badad4f3c4e8ba2122a8aef87a4.tar.xz
compfy-f0e03e52a31a7badad4f3c4e8ba2122a8aef87a4.zip
changed 'inactive-opacity-exclude' to 'inactive-exclude', updated sample config, inactive-exclude now cancels inactive-dim1.3.2
Diffstat (limited to 'src')
-rw-r--r--src/config_libconfig.c2
-rw-r--r--src/options.c2
-rw-r--r--src/win.c14
3 files changed, 13 insertions, 5 deletions
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;
}