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,12 +364,14 @@ xdg_toplevel_view_map(struct view *view)
|
||||||
static void
|
static void
|
||||||
xdg_toplevel_view_unmap(struct view *view)
|
xdg_toplevel_view_unmap(struct view *view)
|
||||||
{
|
{
|
||||||
|
if (view->mapped) {
|
||||||
view->mapped = false;
|
view->mapped = false;
|
||||||
damage_all_outputs(view->server);
|
damage_all_outputs(view->server);
|
||||||
wl_list_remove(&view->commit.link);
|
wl_list_remove(&view->commit.link);
|
||||||
wl_list_remove(&view->new_subsurface.link);
|
wl_list_remove(&view->new_subsurface.link);
|
||||||
desktop_focus_topmost_mapped_view(view->server);
|
desktop_focus_topmost_mapped_view(view->server);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static const struct view_impl xdg_toplevel_view_impl = {
|
static const struct view_impl xdg_toplevel_view_impl = {
|
||||||
.configure = xdg_toplevel_view_configure,
|
.configure = xdg_toplevel_view_configure,
|
||||||
|
|
|
||||||
|
|
@ -279,11 +279,13 @@ map(struct view *view)
|
||||||
static void
|
static void
|
||||||
unmap(struct view *view)
|
unmap(struct view *view)
|
||||||
{
|
{
|
||||||
|
if(view->mapped) {
|
||||||
view->mapped = false;
|
view->mapped = false;
|
||||||
damage_all_outputs(view->server);
|
damage_all_outputs(view->server);
|
||||||
wl_list_remove(&view->commit.link);
|
wl_list_remove(&view->commit.link);
|
||||||
desktop_focus_topmost_mapped_view(view->server);
|
desktop_focus_topmost_mapped_view(view->server);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
maximize(struct view *view, bool maximized)
|
maximize(struct view *view, bool maximized)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue