fix(macos): add a project opened over a fullscreen tab group as a tab (#1467)

A project-tab group goes fullscreen through simple fullscreen, which is_fullscreen() doesn't report, so with the default "prefer tabs in full screen only" a project opened over a fullscreen group came up as a floating window. The new-project tab target now also counts simple fullscreen.

Fixes #1438
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-05 13:29:49 +08:00
1 джерело 2760c91bde
коміт 73be53b6d9
1 file changed
+3 -1
+3 -1
Переглянути файл
@@ -46,7 +46,9 @@ pub fn new_project_tab_target(app: &AppHandle, launch: &Launch) -> IdeResult<Opt
let host = app.state::<crate::state::AppState>();
host.project(w.label()).is_ok_and(|p| !p.light) || host.remote_dev.get(w.label()).is_some()
});
let fullscreen = active.as_ref().is_some_and(|w| w.is_fullscreen().unwrap_or(false));
// A project-tab group is fullscreen through simple fullscreen, which the native flag misses.
let fullscreen =
active.as_ref().is_some_and(|w| w.is_fullscreen().unwrap_or(false) || is_simple_fullscreen(w.label()));
let light_edit = launch.project.is_none() && launch.remote.is_none();
Ok(should_group_new_project(tabbing_preference(app)?, fullscreen, active.is_some(), light_edit)
.then_some(active)