Root: centralize focus(null) calls in applyPending()

This commit is contained in:
Isaac Freund
2023-03-01 10:49:44 +01:00
parent 07154720fa
commit 6411c71151
11 changed files with 21 additions and 39 deletions

View File

@ -478,16 +478,6 @@ pub fn unmap(view: *Self) void {
server.root.hidden.pending.wm_stack.prepend(view);
}
{
var it = server.input_manager.seats.first;
while (it) |node| : (it = node.next) {
const seat = &node.data;
if (seat.focused == .view and seat.focused.view == view) {
seat.focus(null);
}
}
}
view.request_activate.link.remove();
server.root.applyPending();