diff options
author | Gunnar Beutner <gunnar@beutner.name> | 2022-11-07 19:01:43 +0100 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2022-12-25 07:58:58 -0700 |
commit | 5f3b82dcba17547fbe0ea6664a267b4c11d9ddc7 (patch) | |
tree | 09b8ee6eb4afa036a55202aa64679a72ccdb2583 | |
parent | eaff4a1d65a13ed7a2d88157ce79d5cd515550ec (diff) | |
download | serenity-5f3b82dcba17547fbe0ea6664a267b4c11d9ddc7.zip |
Ladybird: Don't update window titles when background tabs change titles
Steps to reproduce:
1. Open the Cookie Clicker game in a tab.
2. Open another website in another tab and make that the current tab.
3. Observe how the window's title mentions Cookie Clicker.
-rw-r--r-- | Ladybird/BrowserWindow.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Ladybird/BrowserWindow.cpp b/Ladybird/BrowserWindow.cpp index 1d30aff720..551d083882 100644 --- a/Ladybird/BrowserWindow.cpp +++ b/Ladybird/BrowserWindow.cpp @@ -334,10 +334,12 @@ void BrowserWindow::tab_title_changed(int index, QString const& title) { if (title.isEmpty()) { m_tabs_container->setTabText(index, "..."); - setWindowTitle("Ladybird"); + if (m_tabs_container->currentIndex() == index) + setWindowTitle("Ladybird"); } else { m_tabs_container->setTabText(index, title); - setWindowTitle(QString("%1 - Ladybird").arg(title)); + if (m_tabs_container->currentIndex() == index) + setWindowTitle(QString("%1 - Ladybird").arg(title)); } } |