Skip to content

Conversation

@JakkuSakura
Copy link

@JakkuSakura JakkuSakura commented Dec 12, 2025

This PR introduces multi-window management and easy to use API and example

@JakkuSakura JakkuSakura marked this pull request as draft December 13, 2025 15:03
@JakkuSakura JakkuSakura force-pushed the window-manager branch 4 times, most recently from ef372fb to 1a18f2d Compare December 14, 2025 12:56
@JakkuSakura JakkuSakura marked this pull request as ready for review December 14, 2025 12:59
@JakkuSakura JakkuSakura marked this pull request as draft December 14, 2025 13:08
@JakkuSakura JakkuSakura marked this pull request as ready for review December 25, 2025 07:36
@JakkuSakura JakkuSakura force-pushed the window-manager branch 4 times, most recently from e4ae582 to 700e3f7 Compare December 25, 2025 12:28
Copy link
Collaborator

@nicoburns nicoburns left a comment

Choose a reason for hiding this comment

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

I have some comments about thread synchronisation. In addition to that, we're hoping to align the API with the one from Dioxus Desktop, so that users could use the same code with either Desktop or Native.

https://docs.rs/dioxus-desktop/latest/dioxus_desktop/fn.use_window.html

https://docs.rs/dioxus-desktop/latest/dioxus_desktop/struct.DesktopService.html#method.new_window

Comment on lines 33 to 39
let vdom = VirtualDom::new(secondary_window);
let title = format!("window#{}", counter());
let attributes = WindowAttributes::default()
.with_title(title)
.with_inner_size(winit::dpi::LogicalSize::new(400.0, 300.0));
let receiver = provider.create_document_window(vdom, attributes);
let mut spawned_windows = spawned_windows.clone();
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder whether create_document_window should accept a "function that returns a VirtualDom" (similar to launch) rather than an already constructed VirtualDom? That might eliminate the thread-safety issues?

Copy link
Author

Choose a reason for hiding this comment

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

Maybe not able to elimate thread-safety issues. It's because BlitzShellEvent::embedder_event still requires Send + Sync

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