From 01a2aabc566dd5edc794641e4fae86cb42c5f6dd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 16 Oct 2026 17:10:00 +0530 Subject: [PATCH] Fix #10675 --- docs/changelog.rst | 3 +++ kitty/main.py | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 541b9628a..362bcc3d0 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -488,6 +488,9 @@ Detailed list of changes - macOS: Fix a memory leak when getting the list of all processes, for example, when querying the memory used by child processes (:iss:`10673`) +- Sessions: Fix ``os_window_title`` having no effect on the first OS Window + created when starting kitty with a session file (:iss:`10675`) + 0.49.2 [2026-10-01] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/main.py b/kitty/main.py index 571f8090e..c3ae7346f 100644 --- a/kitty/main.py +++ b/kitty/main.py @@ -347,6 +347,7 @@ def _run_app(opts: Options, args: CLIOptions, bad_lines: Sequence[BadLine] = (), pos_x, pos_y = parse_os_window_position(args.position) wincls = (startup_sessions[0].os_window_class if startup_sessions else '') or args.cls or appname winname = (startup_sessions[0].os_window_name if startup_sessions else '') or args.name or wincls or appname + wintitle = (startup_sessions[0].os_window_title if startup_sessions else '') or args.title window_state = (args.start_as if args.start_as and args.start_as != 'normal' else None) or ( # ty: ignore[redundant-condition] getattr(startup_sessions[0], 'os_window_state', None) if startup_sessions else None ) @@ -359,12 +360,12 @@ def _run_app(opts: Options, args: CLIOptions, bad_lines: Sequence[BadLine] = (), window_id = create_os_window( run_app.initial_window_size_func(get_os_window_sizing_data(opts, startup_sessions[0] if startup_sessions else None), cached_values), pre_show_callback, - args.title or appname, + wintitle or appname, winname, wincls, wstate, load_all_shaders, - disallow_override_title=bool(args.title), + disallow_override_title=bool(wintitle), layer_shell_config=run_app.layer_shell_config, x=pos_x, y=pos_y,