Skip to content

Conversation

@njust
Copy link
Contributor

@njust njust commented Oct 23, 2025

Fixes #3089.

@hecrj
Copy link
Member

hecrj commented Oct 26, 2025

Would this be considered a softbuffer bug?

@hecrj hecrj force-pushed the multi-window-fix-iced-rs branch from 44ad7eb to 8374c6b Compare December 1, 2025 00:15
@hecrj hecrj added this to the 0.14 milestone Dec 1, 2025
@hecrj hecrj added bug Something isn't working rendering shell fix labels Dec 1, 2025
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!

However, I have been able to identify the root cause and keep a single shared Context.

The actual issue is that softbuffer::Context expects a HasDisplayHandle and not an actual window.

Therefore, a reference to the first window we use to create the Compositor is stored in the Context and is never dropped when iced_winit closes it.

The solution is to introduce an additional display argument to the Compositor constructors and leverage that instead to create the Context.

@hecrj hecrj changed the title Fix #3089: cannot close first window if a second window is open Provide a Display handle to graphics::Compositor Dec 1, 2025
@hecrj hecrj enabled auto-merge December 1, 2025 00:21
@hecrj hecrj merged commit 2ee5f47 into iced-rs:master Dec 1, 2025
15 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 rendering shell

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tiny-skia] Multi window demo: cannot close first window if a second window is open

2 participants