From 663e1a1a04127eb3fa0206ed0feaf8ffd6b9999f Mon Sep 17 00:00:00 2001 From: Richard Grenville Date: Tue, 24 Feb 2015 20:59:41 +0800 Subject: [PATCH] Bug fix: --active-opacity state does not change correctly on `--focus-exclude`-ed windows Fix the bug that --active-opacity state does not change on `--focus-exclude`-ed windows correctly, since win_update_focused() enables the WFLAG_OPCT_CHANGE flag on a window only if w->focused changes, while --active-opacity depends on the output of win_is_focused_real() instead of w->focused, which could be changed even if w->focused does not change (e.g. when the window is `--focus-exclude`-ed). --- src/compton.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compton.c b/src/compton.c index d8efda1..38e25ce 100644 --- a/src/compton.c +++ b/src/compton.c @@ -3465,8 +3465,10 @@ win_update_focused(session_t *ps, win *w) { } } - if (w->focused != focused_old) - w->flags |= WFLAG_OPCT_CHANGE; + // Always recalculate the window target opacity, since some opacity-related + // options depend on the output value of win_is_focused_real() instead of + // w->focused + w->flags |= WFLAG_OPCT_CHANGE; } /**