From 344ca73930912d2c3f224ed1f392fbe5ed7bbbed Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 12 Oct 2022 14:23:14 +0200 Subject: [PATCH] TextEditor: Set window title before showing the main window Previously TextEditor updated its window title after the window was already visible. This causes the default title ("GUI::Window") to be shown for a short period of time which was especially noticeable when opening files. --- Userland/Applications/TextEditor/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/Applications/TextEditor/main.cpp b/Userland/Applications/TextEditor/main.cpp index 21f13707a59..825cf562e03 100644 --- a/Userland/Applications/TextEditor/main.cpp +++ b/Userland/Applications/TextEditor/main.cpp @@ -67,6 +67,7 @@ ErrorOr serenity_main(Main::Arguments arguments) } text_widget->initialize_menubar(*window); + text_widget->update_title(); window->show(); window->set_icon(app_icon.bitmap_for_size(16)); @@ -85,8 +86,9 @@ ErrorOr serenity_main(Main::Arguments arguments) return 1; text_widget->editor().set_cursor_and_focus_line(parsed_argument.line().value_or(1) - 1, parsed_argument.column().value_or(0)); } + + text_widget->update_title(); } - text_widget->update_title(); text_widget->update_statusbar(); return app->exec();