Skip to content

Support for multiple viewports with native windows #454

@SkyLeite

Description

@SkyLeite

Hey! Thank you for this crate, it's been extremely useful in my project so far :)

Would it be possible to add support for having extra viewports as native windows, as described here?

I tried to use it with the following code, but the ViewportClass is Embedded, which means the backend will draw additional viewports inside the existing one instead of native windows:

let viewport =
    egui::viewport::ViewportBuilder::default().with_window_type(egui::X11WindowType::Desktop);

contexts.ctx_mut()?.show_viewport_immediate(
    egui::ViewportId(egui::Id::new("DBG")),
    viewport,
    |context, vp| {
		assert_eq!(egui::ViewportClass::Embedded, false);
        egui::Window::new("Debug").show(context, |ui| ui.label("Hi"));
    },
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions