mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-07 19:49:53 -05:00
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:
parent
1215b8e5de
commit
afed68101c
2 changed files with 12 additions and 0 deletions
|
|
@ -113,6 +113,12 @@ fn handleMap(
|
|||
fn handleUnmap(listener: *wl.Listener(void)) void {
|
||||
const layer_surface: *LayerSurface = @fieldParentPtr("unmap", listener);
|
||||
|
||||
if (server.seat.focused_surface) |fs| {
|
||||
if (fs == .layer_surface and fs.layer_surface == layer_surface) {
|
||||
server.seat.focusSurface(null);
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: this crashes mez when killing mez
|
||||
layer_surface.output.arrangeLayers();
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue