mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
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:
parent
730a642bea
commit
3a29e436e5
2 changed files with 13 additions and 9 deletions
|
|
@ -364,11 +364,13 @@ xdg_toplevel_view_map(struct view *view)
|
|||
static void
|
||||
xdg_toplevel_view_unmap(struct view *view)
|
||||
{
|
||||
if (view->mapped) {
|
||||
view->mapped = false;
|
||||
damage_all_outputs(view->server);
|
||||
wl_list_remove(&view->commit.link);
|
||||
wl_list_remove(&view->new_subsurface.link);
|
||||
desktop_focus_topmost_mapped_view(view->server);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct view_impl xdg_toplevel_view_impl = {
|
||||
|
|
|
|||
|
|
@ -279,10 +279,12 @@ map(struct view *view)
|
|||
static void
|
||||
unmap(struct view *view)
|
||||
{
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue