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.
This commit is contained in:
Gunnar Beutner 2022-11-07 19:01:43 +01:00 committed by Andrew Kaster
commit 5f3b82dcba
Notes: sideshowbarker 2024-07-17 04:49:48 +09:00

View file

@ -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));
}
}