Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(platforms/windows)!: Refactor window subclassing to avoid lifetime issue #120

Merged
merged 1 commit into from
Jul 22, 2022

Conversation

mwcampbell
Copy link
Contributor

Replaced WindowSubclass with SubclassingAdapter, which takes ownership of the main adapter. There's no loss of functionality though, because SubclassingAdapter::into_inner uninstalls the subclass and returns ownership of the main adapter. This also slightly simplifies the main winit example, and will make the main winit adapter, which must encapsulate everything in a struct, possible.

@mwcampbell mwcampbell mentioned this pull request Jul 22, 2022
@mwcampbell mwcampbell merged commit 37579aa into main Jul 22, 2022
@mwcampbell mwcampbell deleted the subclassing-owns-adapter branch July 22, 2022 12:53
This was referenced Jul 22, 2022
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