Delete pointless nullptr checks

Lifetime of XdgShellClient is bounded to Workspace, so we no longer need
to check whether tabbox is still present around.
This commit is contained in:
Vlad Zahorodnii 2019-09-24 18:10:06 +03:00
parent 64feafc10f
commit c3772f4c81
3 changed files with 3 additions and 3 deletions

View file

@ -214,7 +214,7 @@ void Client::releaseWindow(bool on_shutdown)
deleting = true;
#ifdef KWIN_BUILD_TABBOX
TabBox::TabBox *tabBox = TabBox::TabBox::self();
if (tabBox && tabBox->isDisplayed() && tabBox->currentClient() == this) {
if (tabBox->isDisplayed() && tabBox->currentClient() == this) {
tabBox->nextPrev(true);
}
#endif

View file

@ -1792,7 +1792,7 @@ void Workspace::updateTabbox()
{
#ifdef KWIN_BUILD_TABBOX
TabBox::TabBox *tabBox = TabBox::TabBox::self();
if (tabBox && tabBox->isDisplayed()) {
if (tabBox->isDisplayed()) {
tabBox->reset(true);
}
#endif

View file

@ -374,7 +374,7 @@ void XdgShellClient::destroyClient()
m_closing = true;
#ifdef KWIN_BUILD_TABBOX
TabBox::TabBox *tabBox = TabBox::TabBox::self();
if (tabBox && tabBox->isDisplayed() && tabBox->currentClient() == this) {
if (tabBox->isDisplayed() && tabBox->currentClient() == this) {
tabBox->nextPrev(true);
}
#endif