View: fix unmap/destroy control flow
Currently the view destruction sequence is started as soon as a view is unmapped. However, this is incorrect as a client may map the view again instead of destroying it. Instead, only start the view destruction sequence when the underlying xdg toplevel or xwayland surface is destroyed.
This commit is contained in:
@ -72,5 +72,5 @@ pub fn focusView(
|
||||
}
|
||||
|
||||
fn filter(view: *View, filter_tags: u32) bool {
|
||||
return !view.destroying and view.pending.tags & filter_tags != 0;
|
||||
return view.surface != null and view.pending.tags & filter_tags != 0;
|
||||
}
|
||||
|
@ -80,6 +80,6 @@ pub fn swap(
|
||||
}
|
||||
|
||||
fn filter(view: *View, filter_tags: u32) bool {
|
||||
return !view.destroying and !view.pending.float and
|
||||
return view.surface != null and !view.pending.float and
|
||||
!view.pending.fullscreen and view.pending.tags & filter_tags != 0;
|
||||
}
|
||||
|
@ -61,6 +61,6 @@ pub fn zoom(
|
||||
}
|
||||
|
||||
fn filter(view: *View, filter_tags: u32) bool {
|
||||
return !view.destroying and !view.pending.float and
|
||||
return view.surface != null and !view.pending.float and
|
||||
!view.pending.fullscreen and view.pending.tags & filter_tags != 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user