From 57e97043c683c488662159be18fe359b617f18d3 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Fri, 30 Aug 2024 16:45:05 +0100 Subject: [PATCH 1/2] docs: clarify interaction between rules and picom-trans Signed-off-by: Yuxuan Shui --- man/picom.1.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/man/picom.1.adoc b/man/picom.1.adoc index c95f179203..5bf2b6e1cf 100644 --- a/man/picom.1.adoc +++ b/man/picom.1.adoc @@ -359,6 +359,8 @@ Most of the rule options should 1:1 map to the new window rules. Here is a list *Inactive dimming and opacity*:: This includes options <>, <>, <>, <>, <>, and <>. When using the window rules, the compositor no longer have an "active window" concept, as it is easy to achieve with window rules. You can use `match = "focused || group_focused"` to match windows that would have been considered active with the old options. Then you can set the opacity and dim level for matched windows accordingly. <> and <> can be achieved by adding `|| wmwin` and `|| override_redirect` to the match string, respectively. <> can be achieved by setting `opacity-override = true`. ++ +NOTE: Setting _opacity_ explicitly with a rule will override the opacity value from the window properties (i.e. _pass:[_]NET_WM_WINDOW_OPACITY_), which is used by tools like `picom-trans` for setting the opacity of window. If you would like to keep using tools like `picom-trans`, you can choose to set the opacity only for windows without the opacity property by matching `! _NET_WM_WINDOW_OPACITY`. *Active window*:: This includes option <>. This option was only used to influence what windows are considered active, to apply inactive opacity and dimming. Since with window rules you no longer need the compositor to help you decide what is active and what is not (see above), this option is no longer needed. From 4f14390f1ad6eecbfa66f68e1f87bdbbf4390a80 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 2 Sep 2024 18:30:50 +0100 Subject: [PATCH 2/2] rules: set default window dim correctly Signed-off-by: Yuxuan Shui --- CHANGELOG.md | 6 ++++++ src/picom.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5c6ed6e5e..54d5ef8ce5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# Unreleased + +## Bug fixes + +* Windows become completely black when `rules` and `inactive-dim` are set at the same time. + # v12-rc3 (2024-Aug-30) ## Bug fixes diff --git a/src/picom.c b/src/picom.c index c66f940a70..f18a8de171 100644 --- a/src/picom.c +++ b/src/picom.c @@ -2000,7 +2000,7 @@ static struct window_options win_options_from_config(const struct options *opts) .shadow = opts->shadow_enable, .corner_radius = (unsigned)opts->corner_radius, .transparent_clipping = opts->transparent_clipping, - .dim = opts->inactive_dim > 0, + .dim = 0, .fade = opts->fading_enable, .shader = opts->window_shader_fg, .invert_color = false,