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

Fix unnecessary COM initialization on Windows #2578

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

Jinderamarak
Copy link
Contributor

@Jinderamarak Jinderamarak commented Sep 13, 2024

I tracked the issue #2577 back to this commit and the file winit/src/program.rs:L273, where the window is first initialized with default() window options instead of the provided ones.

I am not going to lie, I don't know why we need to create a window with default attributes first and then initialize it again with proper attributes later, but if I change the first initialization to be without drag-and-drop support, then COM is initialized later only when it is really required.

I tested this change with examples/events and the reproduction code from the issue and everything works as I would expect it to on Windows.

Fixes #2577.

@Jinderamarak
Copy link
Contributor Author

I would also consider using the window options provided when creating the application in this place, because it would be hard to track all of the flags causing similar side effects.

@hecrj hecrj added bug Something isn't working shell fix labels Sep 13, 2024
@hecrj hecrj added this to the 0.13 milestone Sep 13, 2024
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

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

Thanks!

@hecrj hecrj changed the title Fix unnecessary COM initialization Fix unnecessary COM initialization on Windows Sep 13, 2024
@hecrj hecrj merged commit 8fb939b into iced-rs:master Sep 13, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix shell
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unnecessary COM initialization with drag and drop disabled
2 participants