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 <yshuiv7@gmail.com>
This commit is contained in:
parent
176718ad3b
commit
660d16f555
|
@ -904,6 +904,7 @@ void win_update_opacity_rule(session_t *ps, struct managed_win *w) {
|
||||||
* TODO need better name
|
* TODO need better name
|
||||||
*/
|
*/
|
||||||
void win_on_factor_change(session_t *ps, struct managed_win *w) {
|
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
|
// Focus needs to be updated first, as other rules might depend on the focused
|
||||||
// state of the window
|
// state of the window
|
||||||
win_update_focused(ps, w);
|
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_shadow(ps, w);
|
||||||
win_determine_invert_color(ps, w);
|
win_determine_invert_color(ps, w);
|
||||||
win_determine_blur_background(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);
|
win_update_opacity_rule(ps, w);
|
||||||
if (w->a.map_state == XCB_MAP_STATE_VIEWABLE)
|
if (w->a.map_state == XCB_MAP_STATE_VIEWABLE)
|
||||||
w->paint_excluded = c2_match(ps, w, ps->o.paint_blacklist, NULL);
|
w->paint_excluded = c2_match(ps, w, ps->o.paint_blacklist, NULL);
|
||||||
|
|
Loading…
Reference in New Issue