From 660d16f5559d8cecc344373f9b4ae7f51c5149c9 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Fri, 10 Apr 2020 04:19:53 +0100 Subject: [PATCH] win: update mode in win_on_factor_change win_on_factor_change is called when client window changed for a frame, in that case, the mode of the window could change. Related: #299 Signed-off-by: Yuxuan Shui --- src/win.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/win.c b/src/win.c index 1a10e06..c8c284b 100644 --- a/src/win.c +++ b/src/win.c @@ -904,6 +904,7 @@ void win_update_opacity_rule(session_t *ps, struct managed_win *w) { * TODO need better name */ void win_on_factor_change(session_t *ps, struct managed_win *w) { + log_debug("Window %#010x (%s) factor change", w->base.id, w->name); // Focus needs to be updated first, as other rules might depend on the focused // state of the window win_update_focused(ps, w); @@ -911,6 +912,8 @@ void win_on_factor_change(session_t *ps, struct managed_win *w) { win_determine_shadow(ps, w); win_determine_invert_color(ps, w); win_determine_blur_background(ps, w); + w->mode = win_calc_mode(w); + log_debug("Window mode changed to %d", w->mode); win_update_opacity_rule(ps, w); if (w->a.map_state == XCB_MAP_STATE_VIEWABLE) w->paint_excluded = c2_match(ps, w, ps->o.paint_blacklist, NULL);