xdg-toplevel: remove listeners before view destroy
Currently in handleUnmap() we call View.unmap() before removing listeners. However View.unmap() may destroy the view before returning if the transaction started doesn't have to wait on any configures. To ensure that we don't try to remove listeners which have already been free'd, do this before calling View.unmap().
This commit is contained in:
@ -384,13 +384,12 @@ fn commitTransaction(self: *Self) void {
|
||||
var view_it = output.views.first;
|
||||
while (view_it) |view_node| {
|
||||
const view = &view_node.view;
|
||||
view_it = view_node.next;
|
||||
|
||||
if (view.destroying) {
|
||||
view_it = view_node.next;
|
||||
view.destroy();
|
||||
continue;
|
||||
}
|
||||
defer view_it = view_node.next;
|
||||
|
||||
if (view.pending_serial != null and !view.shouldTrackConfigure()) continue;
|
||||
|
||||
|
Reference in New Issue
Block a user