Skip to content

Commit

Permalink
Ladybird: Don't update window titles when background tabs change titles
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gunnarbeutner authored and ADKaster committed Dec 25, 2022
1 parent eaff4a1 commit 5f3b82d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Ladybird/BrowserWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down

0 comments on commit 5f3b82d

Please sign in to comment.