gtk: fix duplicate signal handlers

pull/9001/head
Jeffrey C. Ollie 2025-10-02 13:43:33 -05:00
parent 052857b58b
commit 10adef3092
No known key found for this signature in database
GPG Key ID: 1BB9EB7EA602265B
1 changed files with 4 additions and 0 deletions

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| {