nitpicker: refresh when focused client disappears

This fix handles the case where the focused domain loses its focus
because the currently focused client vanishes. In this case, the focus
will be undefined and the non-focused views of the domain become
tinted again. The refresh should take effect immediately as soon as the
client vanishes.
This commit is contained in:
Norman Feske 2018-01-12 22:11:48 +01:00
parent e0e9b3b32e
commit 8fca8a9a04

View File

@ -403,6 +403,8 @@ void User_state::forget(View_owner const &owner)
{
_focus.forget(owner);
bool const need_to_update_all_views = (&owner == _focused);
if (&owner == _focused) _focused = nullptr;
if (&owner == _next_focused) _next_focused = nullptr;
if (&owner == _last_clicked) _last_clicked = nullptr;
@ -414,6 +416,9 @@ void User_state::forget(View_owner const &owner)
if (_input_receiver == &owner)
_input_receiver = nullptr;
if (need_to_update_all_views)
_view_stack.update_all_views();
}