gtk: fix duplicate signal handlers

This commit is contained in:
Jeffrey C. Ollie
2025-10-02 13:43:33 -05:00
parent 052857b58b
commit 10adef3092

View File

@@ -693,6 +693,10 @@ pub const Window = extern struct {
self: *Self,
tree: *const Surface.Tree,
) void {
// Ensure that all old signal handlers have been removed before adding
// them. Otherwise we get duplicate surface handlers.
self.disconnectSurfaceHandlers(tree);
const priv = self.private();
var it = tree.iterator();
while (it.next()) |entry| {