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 glow and multiple windows usage #980

Merged
merged 1 commit into from
Aug 3, 2021

Conversation

yamadapc
Copy link
Contributor

@yamadapc yamadapc commented Aug 2, 2021

Hey there 👋

I'm writing a VST plugin host, which might have another iced app as a guest.

In that case, when the guest window opens, the glow context might not be current when redrawing, causing the UI to be frozen.

This commit adds a check prior to redrawing for whether the context is current. It forces the context to become current if it's not. This fixes hosting issues with multiple windows for me. I suppose it might be a necessary change if iced itself had more than one window open at a time.

This was not a problem using the wgpu back-end.

The context might not be current at redraw
@hecrj hecrj added the bug Something isn't working label Aug 3, 2021
@hecrj hecrj added this to the 0.4.0 milestone Aug 3, 2021
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.

Looks reasonable.

I am interested in learning more about running iced as a guest application. How are you doing that? The run method takes control of the main thread and does not return.

@hecrj hecrj merged commit cdd2f24 into iced-rs:master Aug 3, 2021
@yamadapc
Copy link
Contributor Author

yamadapc commented Aug 3, 2021

The guest is using https://github.com/BillyDM/iced_baseview/

That library is changing how iced runs so that it can be embedded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants