diff --git a/client.cpp b/client.cpp --- a/client.cpp +++ b/client.cpp @@ -32,6 +32,9 @@ #include "focuschain.h" #include "group.h" #include "shadow.h" +#ifdef KWIN_BUILD_TABBOX +#include "tabbox.h" +#endif #include "workspace.h" #include "screenedge.h" #include "decorations/decorationbridge.h" @@ -217,6 +220,12 @@ { assert(!deleting); deleting = true; +#ifdef KWIN_BUILD_TABBOX + TabBox::TabBox *tabBox = TabBox::TabBox::self(); + if (tabBox->isDisplayed() && tabBox->currentClient() == this) { + tabBox->nextPrev(true); + } +#endif destroyWindowManagementInterface(); Deleted* del = NULL; if (!on_shutdown) { @@ -287,6 +296,12 @@ { assert(!deleting); deleting = true; +#ifdef KWIN_BUILD_TABBOX + TabBox::TabBox *tabBox = TabBox::TabBox::self(); + if (tabBox->isDisplayed() && tabBox->currentClient() == this) { + tabBox->nextPrev(true); + } +#endif destroyWindowManagementInterface(); Deleted* del = Deleted::create(this); if (isMoveResize()) diff --git a/workspace.cpp b/workspace.cpp --- a/workspace.cpp +++ b/workspace.cpp @@ -679,12 +679,6 @@ clientShortcutUpdated(c); // Needed, since this is otherwise delayed by setShortcut() and wouldn't run } -#ifdef KWIN_BUILD_TABBOX - TabBox::TabBox *tabBox = TabBox::TabBox::self(); - if (tabBox->isDisplayed() && tabBox->currentClient() == c) - tabBox->nextPrev(true); -#endif - Q_ASSERT(clients.contains(c) || desktops.contains(c)); // TODO: if marked client is removed, notify the marked list clients.removeAll(c); @@ -710,6 +704,7 @@ updateStackingOrder(true); #ifdef KWIN_BUILD_TABBOX + TabBox::TabBox *tabBox = TabBox::TabBox::self(); if (tabBox->isDisplayed()) tabBox->reset(true); #endif