From 985def87c79637eb7207f012c5518bd60d065233 Mon Sep 17 00:00:00 2001 From: Pavel Roskin <1317472+proski@users.noreply.github.com> Date: Thu, 21 Aug 2025 13:59:18 -0700 Subject: Fix maximized startup with tabs on macOS Closes #8664. --- CHANGELOG.md | 1 + alacritty/src/window_context.rs | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fcb3f26..ede679de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ Notable changes to the `alacritty_terminal` crate are documented in its - Crash when `AppleFontSmoothing` option is not present on macOS - Origin mode (DECOM) not moving cursor to the origin point - Unresponsiveness when spamming the bell character with a bell command enabled +- `window.startup_mode` applied to existing window when opening a new tab on macOS ## 0.15.1 diff --git a/alacritty/src/window_context.rs b/alacritty/src/window_context.rs index 2784a7e0..9de66791 100644 --- a/alacritty/src/window_context.rs +++ b/alacritty/src/window_context.rs @@ -132,6 +132,13 @@ impl WindowContext { let mut identity = config.window.identity.clone(); options.window_identity.override_identity_config(&mut identity); + // Check if new window will be opened as a tab. + // This must be done before `Window::new()`, which unsets `window_tabbing_id`. + #[cfg(target_os = "macos")] + let tabbed = options.window_tabbing_id.is_some(); + #[cfg(not(target_os = "macos"))] + let tabbed = false; + let window = Window::new( event_loop, &config, @@ -146,12 +153,6 @@ impl WindowContext { let gl_context = renderer::platform::create_gl_context(&gl_display, gl_config, Some(raw_window_handle))?; - // Check if new window will be opened as a tab. - #[cfg(target_os = "macos")] - let tabbed = options.window_tabbing_id.is_some(); - #[cfg(not(target_os = "macos"))] - let tabbed = false; - let display = Display::new(window, gl_context, &config, tabbed)?; let mut window_context = Self::new(display, config, options, proxy)?; -- cgit