win: fix focuse tracking
Call win_on_focus_change on previous focused window too. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
a2dab52334
commit
57f4a99940
|
@ -1369,9 +1369,13 @@ void win_set_focused(session_t *ps, struct managed_win *w) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto old_active_win = ps->active_win;
|
||||||
ps->active_win = w;
|
ps->active_win = w;
|
||||||
assert(win_is_focused_real(ps, w));
|
assert(win_is_focused_real(ps, w));
|
||||||
|
|
||||||
|
if (old_active_win) {
|
||||||
|
win_on_focus_change(ps, old_active_win);
|
||||||
|
}
|
||||||
win_on_focus_change(ps, w);
|
win_on_focus_change(ps, w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue