mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 13:05:12 +00:00
WindowServer: Don't compute title usernames for frameless Windows
This was causing a slight delay when opening ComboBox ListViews. As an easy first optimization, don't bother computing this at all for frameless windows and those not type Normal.
This commit is contained in:
parent
4ba20f08c7
commit
59e10d5283
Notes:
sideshowbarker
2024-07-17 04:18:18 +09:00
Author: https://github.com/thankyouverycool Commit: https://github.com/SerenityOS/serenity/commit/59e10d5283 Pull-request: https://github.com/SerenityOS/serenity/pull/16098
1 changed files with 4 additions and 2 deletions
|
@ -110,8 +110,10 @@ Window::Window(ConnectionFromClient& client, WindowType window_type, WindowMode
|
|||
{
|
||||
if (parent_window)
|
||||
set_parent_window(*parent_window);
|
||||
if (auto title_username_maybe = compute_title_username(&client); !title_username_maybe.is_error())
|
||||
m_title_username = title_username_maybe.release_value();
|
||||
if (!is_frameless() && type() == WindowType::Normal) {
|
||||
if (auto title_username_maybe = compute_title_username(&client); !title_username_maybe.is_error())
|
||||
m_title_username = title_username_maybe.release_value();
|
||||
}
|
||||
WindowManager::the().add_window(*this);
|
||||
frame().window_was_constructed({});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue