mirror of
https://github.com/swaywm/sway.git
synced 2024-11-11 13:04:11 +01:00
Fix segfault in view_unmap()
If the last remaining view on a workspace is unmapped and the workspace is not visible, parent will be a C_OUTPUT. Call the arrange_output() function in this case.
This commit is contained in:
parent
b84dfa794c
commit
91f97fc21a
@ -302,8 +302,12 @@ void view_unmap(struct sway_view *view) {
|
|||||||
view->swayc = NULL;
|
view->swayc = NULL;
|
||||||
view->surface = NULL;
|
view->surface = NULL;
|
||||||
|
|
||||||
|
if (parent->type == C_OUTPUT) {
|
||||||
|
arrange_output(parent);
|
||||||
|
} else {
|
||||||
arrange_children_of(parent);
|
arrange_children_of(parent);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void view_update_position(struct sway_view *view, double ox, double oy) {
|
void view_update_position(struct sway_view *view, double ox, double oy) {
|
||||||
if (view->swayc->x == ox && view->swayc->y == oy) {
|
if (view->swayc->x == ox && view->swayc->y == oy) {
|
||||||
|
Loading…
Reference in New Issue
Block a user