1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:08:10 +00:00

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
parent eaff4a1d65
commit 5f3b82dcba

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