From 5f3b82dcba17547fbe0ea6664a267b4c11d9ddc7 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 7 Nov 2022 19:01:43 +0100 Subject: [PATCH] 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. --- Ladybird/BrowserWindow.cpp | 6 ++++-- 1 file 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)); } }