#486: move a panel into its own native window (multiple monitors)

Problem: floating panels lived inside the main window only, so on a
two-screen setup no panel could go onto the second monitor (#486).

Fix: panel menu > Move Panel to New Window (and the agent/control command
`window.panelWindow {panel, window?}`) undocks the panel if needed and shows
its floating group in a native egui viewport the user can drag to any screen;
Move Panel to Main Window or closing the window brings it back. The window's
place and size are kept in the workspace (sanitised against hostile values)
and restored on the next start. Browser and test builds, which embed
viewports, show it as an in-app window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vangel76
2026-10-11 13:10:12 +02:00
co-authored by Claude Opus 5.5
parent 9a7d3e7699
commit e7ada5bd16
10 changed files with 331 additions and 6 deletions
+5
View File
@@ -566,6 +566,10 @@ pub struct UiState {
/// Floating panels of the saved workspaces.
#[serde(default)]
pub saved_floating: std::collections::BTreeMap<String, Vec<crate::dock::Floating>>,
/// Floating groups shown in their own native window instead of over the dock (Move Panel
/// to New Window), so they can be placed on another monitor.
#[serde(default)]
pub panel_windows: Vec<crate::dock::PanelWindow>,
/// The panel maximized to fill the dock area (`~`), if any.
#[serde(default)]
pub maximized: Option<PanelKind>,
@@ -680,6 +684,7 @@ impl Default for UiState {
saved_workspaces: Default::default(),
floating: vec![],
saved_floating: Default::default(),
panel_windows: vec![],
maximized: None,
locked_tabs: BTreeSet::new(),
viewers: Default::default(),