ensure that when a surface is closed that it is no longer focused

this fixes the regression introduced in the previous commit
This commit is contained in:
Squibid 2025-12-22 20:52:25 -05:00
parent 1215b8e5de
commit afed68101c
Signed by: squibid
GPG key ID: BECE5684D3C4005D
2 changed files with 12 additions and 0 deletions

View file

@ -166,6 +166,12 @@ fn handleUnmap(listener: *wl.Listener(void)) void {
view.mapped = false; // we do this before any work is done so that nobody tries
// any funny business
if (server.seat.focused_surface) |fs| {
if (fs == .view and fs.view == view) {
server.seat.focusSurface(null);
}
}
view.request_fullscreen.link.remove();
view.request_move.link.remove();
view.request_resize.link.remove();