fix crash when a minimized window closes

e.g., open an editor from a terminal, minimize it, then hit ^C in the terminal

simply don't unmap xdg or xwayland views if they are not currently marked as mapped
This commit is contained in:
bi4k8 2021-12-11 23:24:44 +00:00 committed by ARDiDo
parent 730a642bea
commit 3a29e436e5
2 changed files with 13 additions and 9 deletions

View file

@ -279,10 +279,12 @@ map(struct view *view)
static void
unmap(struct view *view)
{
view->mapped = false;
damage_all_outputs(view->server);
wl_list_remove(&view->commit.link);
desktop_focus_topmost_mapped_view(view->server);
if(view->mapped) {
view->mapped = false;
damage_all_outputs(view->server);
wl_list_remove(&view->commit.link);
desktop_focus_topmost_mapped_view(view->server);
}
}
static void