Skip to content

Conversation

mwcampbell
Copy link
Contributor

This is in response to #595.

Copy link
Member

@DataTriny DataTriny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly what I had in mind, thank you. I appreciate the presence of an integration test.

Do you think we should do the same for the macOS subclassing adapter? I imagine that a double instantiation could also wreak havoc over there.

@mwcampbell
Copy link
Contributor Author

I implemented the same check on macOS, but I don't know how to write a test for it, because an NSWindow or NSView has to be instantiated on the process's main thread, and cargo tests apparently don't run on the main thread even if there's only one test in the crate.

@DataTriny
Copy link
Member

Thanks. Well this is unfortunate and we will have to find a solution for tests on macOS anyway. But I am fine not having a test for this now.

@DataTriny DataTriny merged commit 0598573 into main Jul 16, 2025
16 checks passed
@DataTriny DataTriny deleted the windows-subclass-double-instantiate-panic branch July 16, 2025 21:45
@DataTriny DataTriny mentioned this pull request Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants