diff --git a/kcmkwin/kwintabbox/main.cpp b/kcmkwin/kwintabbox/main.cpp index 3f047d1657..b13993dc57 100644 --- a/kcmkwin/kwintabbox/main.cpp +++ b/kcmkwin/kwintabbox/main.cpp @@ -133,25 +133,31 @@ KWinTabBoxConfig::KWinTabBoxConfig(QWidget* parent, const QVariantList& args) m_alternativeTabBoxUi->effectConfigButton->setIcon(KIcon("configure")); // combo boxes - connect(m_primaryTabBoxUi->listModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); - connect(m_primaryTabBoxUi->switchingModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); + connect(m_primaryTabBoxUi->desktopModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); + connect(m_primaryTabBoxUi->activitiesModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); + connect(m_primaryTabBoxUi->applicationsModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); connect(m_primaryTabBoxUi->minimizedModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); + connect(m_primaryTabBoxUi->showDesktopModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); + connect(m_primaryTabBoxUi->multiScreenModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); + connect(m_primaryTabBoxUi->switchingModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); connect(m_primaryTabBoxUi->effectCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); // check boxes connect(m_primaryTabBoxUi->showOutlineCheck, SIGNAL(stateChanged(int)), this, SLOT(changed())); connect(m_primaryTabBoxUi->showTabBox, SIGNAL(toggled(bool)), this, SLOT(changed())); connect(m_primaryTabBoxUi->highlightWindowCheck, SIGNAL(stateChanged(int)), this, SLOT(changed())); - connect(m_primaryTabBoxUi->showDesktopBox, SIGNAL(stateChanged(int)), this, SLOT(changed())); // combo boxes alternative - connect(m_alternativeTabBoxUi->listModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); - connect(m_alternativeTabBoxUi->switchingModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); + connect(m_alternativeTabBoxUi->desktopModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); + connect(m_alternativeTabBoxUi->activitiesModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); + connect(m_alternativeTabBoxUi->applicationsModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); connect(m_alternativeTabBoxUi->minimizedModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); + connect(m_alternativeTabBoxUi->showDesktopModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); + connect(m_alternativeTabBoxUi->multiScreenModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); + connect(m_alternativeTabBoxUi->switchingModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); connect(m_alternativeTabBoxUi->effectCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed())); // check boxes alternative connect(m_alternativeTabBoxUi->showOutlineCheck, SIGNAL(stateChanged(int)), this, SLOT(changed())); connect(m_alternativeTabBoxUi->showTabBox, SIGNAL(toggled(bool)), this, SLOT(changed())); connect(m_alternativeTabBoxUi->highlightWindowCheck, SIGNAL(stateChanged(int)), this, SLOT(changed())); - connect(m_alternativeTabBoxUi->showDesktopBox, SIGNAL(stateChanged(int)), this, SLOT(changed())); // effects connect(m_primaryTabBoxUi->effectCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotEffectSelectionChanged(int))); @@ -224,16 +230,22 @@ void KWinTabBoxConfig::load() void KWinTabBoxConfig::loadConfig(const KConfigGroup& config, KWin::TabBox::TabBoxConfig& tabBoxConfig) { - tabBoxConfig.setClientListMode(TabBox::TabBoxConfig::ClientListMode( - config.readEntry("ListMode", TabBox::TabBoxConfig::defaultListMode()))); - tabBoxConfig.setClientSwitchingMode(TabBox::TabBoxConfig::ClientSwitchingMode( - config.readEntry("SwitchingMode", TabBox::TabBoxConfig::defaultSwitchingMode()))); + tabBoxConfig.setClientDesktopMode(TabBox::TabBoxConfig::ClientDesktopMode( + config.readEntry("DesktopMode", TabBox::TabBoxConfig::defaultDesktopMode()))); + tabBoxConfig.setClientActivitiesMode(TabBox::TabBoxConfig::ClientActivitiesMode( + config.readEntry("ActivitiesMode", TabBox::TabBoxConfig::defaultActivitiesMode()))); + tabBoxConfig.setClientApplicationsMode(TabBox::TabBoxConfig::ClientApplicationsMode( + config.readEntry("ApplicationsMode", TabBox::TabBoxConfig::defaultApplicationsMode()))); tabBoxConfig.setClientMinimizedMode(TabBox::TabBoxConfig::ClientMinimizedMode( config.readEntry("MinimizedMode", TabBox::TabBoxConfig::defaultMinimizedMode()))); + tabBoxConfig.setShowDesktopMode(TabBox::TabBoxConfig::ShowDesktopMode( + config.readEntry("ShowDesktopMode", TabBox::TabBoxConfig::defaultShowDesktopMode()))); + tabBoxConfig.setClientMultiScreenMode(TabBox::TabBoxConfig::ClientMultiScreenMode( + config.readEntry("MultiScreenMode", TabBox::TabBoxConfig::defaultMultiScreenMode()))); + tabBoxConfig.setClientSwitchingMode(TabBox::TabBoxConfig::ClientSwitchingMode( + config.readEntry("SwitchingMode", TabBox::TabBoxConfig::defaultSwitchingMode()))); tabBoxConfig.setLayout(TabBox::TabBoxConfig::LayoutMode( config.readEntry("LayoutMode", TabBox::TabBoxConfig::defaultLayoutMode()))); - tabBoxConfig.setShowDesktop(config.readEntry("ShowDesktop", - TabBox::TabBoxConfig::defaultShowDesktop())); tabBoxConfig.setShowOutline(config.readEntry("ShowOutline", TabBox::TabBoxConfig::defaultShowOutline())); @@ -254,13 +266,16 @@ void KWinTabBoxConfig::loadConfig(const KConfigGroup& config, KWin::TabBox::TabB void KWinTabBoxConfig::saveConfig(KConfigGroup& config, const KWin::TabBox::TabBoxConfig& tabBoxConfig) { // combo boxes - config.writeEntry("ListMode", int(tabBoxConfig.clientListMode())); - config.writeEntry("SwitchingMode", int(tabBoxConfig.clientSwitchingMode())); + config.writeEntry("DesktopMode", int(tabBoxConfig.clientDesktopMode())); + config.writeEntry("ActivitiesMode", int(tabBoxConfig.clientActivitiesMode())); + config.writeEntry("ApplicationsMode", int(tabBoxConfig.clientApplicationsMode())); config.writeEntry("MinimizedMode", int(tabBoxConfig.clientMinimizedMode())); + config.writeEntry("ShowDesktopMode", int(tabBoxConfig.showDesktopMode())); + config.writeEntry("MultiScreenMode", int(tabBoxConfig.clientMultiScreenMode())); + config.writeEntry("SwitchingMode", int(tabBoxConfig.clientSwitchingMode())); config.writeEntry("LayoutMode", int(tabBoxConfig.layout())); config.writeEntry("LayoutName", tabBoxConfig.layoutName()); config.writeEntry("SelectedLayoutName", tabBoxConfig.selectedItemLayoutName()); - config.writeEntry("ShowDesktop", tabBoxConfig.isShowDesktop()); // check boxes config.writeEntry("ShowOutline", tabBoxConfig.isShowOutline()); @@ -357,30 +372,36 @@ void KWinTabBoxConfig::save() void KWinTabBoxConfig::defaults() { // combo boxes - m_primaryTabBoxUi->listModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultListMode()); - m_primaryTabBoxUi->switchingModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultSwitchingMode()); + m_primaryTabBoxUi->desktopModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultDesktopMode()); + m_primaryTabBoxUi->activitiesModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultActivitiesMode()); + m_primaryTabBoxUi->applicationsModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultApplicationsMode()); m_primaryTabBoxUi->minimizedModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultMinimizedMode()); + m_primaryTabBoxUi->showDesktopModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultShowDesktopMode()); + m_primaryTabBoxUi->multiScreenModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultMultiScreenMode()); + m_primaryTabBoxUi->switchingModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultSwitchingMode()); // checkboxes m_primaryTabBoxUi->showOutlineCheck->setChecked(TabBox::TabBoxConfig::defaultShowOutline()); m_primaryTabBoxUi->showTabBox->setChecked(TabBox::TabBoxConfig::defaultShowTabBox()); m_primaryTabBoxUi->highlightWindowCheck->setChecked(TabBox::TabBoxConfig::defaultHighlightWindow()); - m_primaryTabBoxUi->showDesktopBox->setChecked(TabBox::TabBoxConfig::defaultShowDesktop()); // effects m_primaryTabBoxUi->effectCombo->setCurrentIndex(1); // alternative // combo boxes - m_alternativeTabBoxUi->listModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultListMode()); - m_alternativeTabBoxUi->switchingModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultSwitchingMode()); + m_alternativeTabBoxUi->desktopModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultDesktopMode()); + m_alternativeTabBoxUi->activitiesModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultActivitiesMode()); + m_alternativeTabBoxUi->applicationsModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultApplicationsMode()); m_alternativeTabBoxUi->minimizedModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultMinimizedMode()); + m_alternativeTabBoxUi->showDesktopModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultShowDesktopMode()); + m_alternativeTabBoxUi->multiScreenModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultMultiScreenMode()); + m_alternativeTabBoxUi->switchingModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultSwitchingMode()); // checkboxes m_alternativeTabBoxUi->showOutlineCheck->setChecked(TabBox::TabBoxConfig::defaultShowOutline()); m_alternativeTabBoxUi->showTabBox->setChecked(TabBox::TabBoxConfig::defaultShowTabBox()); m_alternativeTabBoxUi->highlightWindowCheck->setChecked(TabBox::TabBoxConfig::defaultHighlightWindow()); - m_alternativeTabBoxUi->showDesktopBox->setChecked(TabBox::TabBoxConfig::defaultShowDesktop()); // effects m_alternativeTabBoxUi->effectCombo->setCurrentIndex(Layout); @@ -403,27 +424,33 @@ bool KWinTabBoxConfig::effectEnabled(const QString& effect, const KConfigGroup& void KWinTabBoxConfig::updateUiFromConfig(KWinTabBoxConfigForm* ui, const KWin::TabBox::TabBoxConfig& config) { // combo boxes - ui->listModeCombo->setCurrentIndex(config.clientListMode()); - ui->switchingModeCombo->setCurrentIndex(config.clientSwitchingMode()); + ui->desktopModeCombo->setCurrentIndex(config.clientDesktopMode()); + ui->activitiesModeCombo->setCurrentIndex(config.clientActivitiesMode()); + ui->applicationsModeCombo->setCurrentIndex(config.clientApplicationsMode()); ui->minimizedModeCombo->setCurrentIndex(config.clientMinimizedMode()); + ui->showDesktopModeCombo->setCurrentIndex(config.showDesktopMode()); + ui->multiScreenModeCombo->setCurrentIndex(config.clientMultiScreenMode()); + ui->switchingModeCombo->setCurrentIndex(config.clientSwitchingMode()); // check boxes ui->showOutlineCheck->setChecked(config.isShowOutline()); ui->showTabBox->setChecked(config.isShowTabBox()); ui->highlightWindowCheck->setChecked(config.isHighlightWindows()); - ui->showDesktopBox->setChecked(config.isShowDesktop()); } void KWinTabBoxConfig::updateConfigFromUi(const KWin::KWinTabBoxConfigForm* ui, TabBox::TabBoxConfig& config) { - config.setClientListMode(TabBox::TabBoxConfig::ClientListMode(ui->listModeCombo->currentIndex())); - config.setClientSwitchingMode(TabBox::TabBoxConfig::ClientSwitchingMode(ui->switchingModeCombo->currentIndex())); + config.setClientDesktopMode(TabBox::TabBoxConfig::ClientDesktopMode(ui->desktopModeCombo->currentIndex())); + config.setClientActivitiesMode(TabBox::TabBoxConfig::ClientActivitiesMode(ui->activitiesModeCombo->currentIndex())); + config.setClientApplicationsMode(TabBox::TabBoxConfig::ClientApplicationsMode(ui->applicationsModeCombo->currentIndex())); config.setClientMinimizedMode(TabBox::TabBoxConfig::ClientMinimizedMode(ui->minimizedModeCombo->currentIndex())); + config.setShowDesktopMode(TabBox::TabBoxConfig::ShowDesktopMode(ui->showDesktopModeCombo->currentIndex())); + config.setClientMultiScreenMode(TabBox::TabBoxConfig::ClientMultiScreenMode(ui->multiScreenModeCombo->currentIndex())); + config.setClientSwitchingMode(TabBox::TabBoxConfig::ClientSwitchingMode(ui->switchingModeCombo->currentIndex())); config.setShowOutline(ui->showOutlineCheck->isChecked()); config.setShowTabBox(ui->showTabBox->isChecked()); config.setHighlightWindows(ui->highlightWindowCheck->isChecked()); - config.setShowDesktop(ui->showDesktopBox->isChecked()); } void KWinTabBoxConfig::slotEffectSelectionChanged(int index) diff --git a/kcmkwin/kwintabbox/main.ui b/kcmkwin/kwintabbox/main.ui index a316b286b1..d83d532ca3 100644 --- a/kcmkwin/kwintabbox/main.ui +++ b/kcmkwin/kwintabbox/main.ui @@ -23,15 +23,15 @@ - List windows: + Desktop: - listModeCombo + desktopModeCombo - + 0 @@ -40,38 +40,33 @@ - Current Desktop + Windows from all desktops - All Desktops + Windows from current desktop only - Current Desktop Grouped by Applications - - - - - All Desktops Grouped by Applications + Exclude windows from current desktop - + - Sort order: + Activities: - switchingModeCombo + activitiesModeCombo - + 0 @@ -80,18 +75,58 @@ - Recently used + Windows from all activities - Stacking order + Windows from current activity only + + + + + Exclude windows from current activity - + + + Applications: + + + applicationsModeCombo + + + + + + + + 0 + 0 + + + + + All windows from all applications + + + + + Only one window per application + + + + + All windows of the current application only + + + + + + Minimized: @@ -100,7 +135,7 @@ - + @@ -125,18 +160,103 @@ + + + + Show desktop: + + + showDesktopModeCombo + + + + + + + + 0 + 0 + + + + + Do not show desktop + + + + + Show desktop to minimize all windows + + + + + + + + Multi screen: + + + multiScreenModeCombo + + + + + + + + 0 + 0 + + + + + Ignore + + + + + Only windows from current screen + + + + + Exclude windows from current screen + + + + + + + + Sort order: + + + switchingModeCombo + + + + + + + + 0 + 0 + + + + + Recently used + + + + + Stacking order + + + + - - - - Adds an entry to minimize all windows. - - - Include desktop - - - @@ -164,7 +284,7 @@ - + Effect: @@ -282,8 +402,14 @@ - listModeCombo + desktopModeCombo + activitiesModeCombo + applicationsModeCombo + minimizedModeCombo + showDesktopModeCombo + multiScreenModeCombo switchingModeCombo + highlightWindowCheck showOutlineCheck effectCombo effectConfigButton diff --git a/tabbox/clientmodel.cpp b/tabbox/clientmodel.cpp index e7ba4cced2..eae1cfa817 100644 --- a/tabbox/clientmodel.cpp +++ b/tabbox/clientmodel.cpp @@ -183,9 +183,7 @@ void ClientModel::createClientList(int desktop, bool partialReset) TabBoxClient* c = tabBox->nextClientFocusChain(start); TabBoxClient* stop = c; while (c) { - TabBoxClient* add = tabBox->clientToAddToList(c, desktop, - tabBox->config().clientListMode() == TabBoxConfig::AllDesktopsClientList || - tabBox->config().clientListMode() == TabBoxConfig::AllDesktopsApplicationList); + TabBoxClient* add = tabBox->clientToAddToList(c, desktop); if (add != NULL) { if (start == add) { m_clientList.removeAll(add); @@ -210,9 +208,7 @@ void ClientModel::createClientList(int desktop, bool partialReset) TabBoxClient* stop = c; int index = 0; while (c) { - TabBoxClient* add = tabBox->clientToAddToList(c, desktop, - tabBox->config().clientListMode() == TabBoxConfig::AllDesktopsClientList || - tabBox->config().clientListMode() == TabBoxConfig::AllDesktopsApplicationList); + TabBoxClient* add = tabBox->clientToAddToList(c, desktop); if (add != NULL) { if (start == add) { m_clientList.removeAll(add); @@ -239,7 +235,7 @@ void ClientModel::createClientList(int desktop, bool partialReset) m_clientList.removeAll(c); m_clientList.prepend(c); } - if (tabBox->config().isShowDesktop()) { + if (tabBox->config().showDesktopMode() == TabBoxConfig::ShowDesktopClient) { TabBoxClient* desktopClient = tabBox->desktopClient(); if (desktopClient) m_clientList.append(desktopClient); diff --git a/tabbox/declarative.cpp b/tabbox/declarative.cpp index 17a19499b2..a470fe83fe 100644 --- a/tabbox/declarative.cpp +++ b/tabbox/declarative.cpp @@ -167,8 +167,7 @@ void DeclarativeView::showEvent(QShowEvent *event) rootObject()->setProperty("screenWidth", m_currentScreenGeometry.width()); rootObject()->setProperty("screenHeight", m_currentScreenGeometry.height()); rootObject()->setProperty("allDesktops", tabBox->config().tabBoxMode() == TabBoxConfig::ClientTabBox && - ((tabBox->config().clientListMode() == TabBoxConfig::AllDesktopsClientList) || - (tabBox->config().clientListMode() == TabBoxConfig::AllDesktopsApplicationList))); + tabBox->config().clientDesktopMode() == TabBoxConfig::AllDesktopsClients); if (ClientModel *clientModel = qobject_cast(m_model)) { rootObject()->setProperty("longestCaption", clientModel->longestCaption()); } diff --git a/tabbox/tabbox.cpp b/tabbox/tabbox.cpp index 4f26d41448..f0e745fcf8 100644 --- a/tabbox/tabbox.cpp +++ b/tabbox/tabbox.cpp @@ -121,22 +121,101 @@ TabBoxClient* TabBoxHandlerImpl::activeClient() const return NULL; } -TabBoxClient* TabBoxHandlerImpl::clientToAddToList(TabBoxClient* client, int desktop, bool allDesktops) const +bool TabBoxHandlerImpl::checkDesktop(TabBoxClient* client, int desktop) const { + Client* current = (static_cast< TabBoxClientImpl* >(client))->client(); + + switch (config().clientDesktopMode()) { + case TabBoxConfig::AllDesktopsClients: + return true; + case TabBoxConfig::ExcludeCurrentDesktopClients: + return !current->isOnDesktop(desktop); + default: // TabBoxConfig::OnlyCurrentDesktopClients + return current->isOnDesktop(desktop); + } +} + +bool TabBoxHandlerImpl::checkActivity(TabBoxClient* client) const +{ + Client* current = (static_cast< TabBoxClientImpl* >(client))->client(); + + switch (config().clientActivitiesMode()) { + case TabBoxConfig::AllActivitiesClients: + return true; + case TabBoxConfig::ExcludeCurrentActivityClients: + return !current->isOnCurrentActivity(); + default: // TabBoxConfig::OnlyCurrentActivityClients + return current->isOnCurrentActivity(); + } +} + +bool TabBoxHandlerImpl::checkApplications(TabBoxClient* client) const +{ + Client* current = (static_cast< TabBoxClientImpl* >(client))->client(); + TabBoxClientImpl* c; + QListIterator< TabBoxClient* > i(clientList()); + + switch (config().clientApplicationsMode()) { + case TabBoxConfig::OneWindowPerApplication: + // check if the list already contains an entry of this application + while (i.hasNext()) { + if ((c = dynamic_cast< TabBoxClientImpl* >(i.next()))) { + if (c->client()->resourceClass() == current->resourceClass()) { + return false; + } + } + } + return true; + case TabBoxConfig::AllWindowsCurrentApplication: + if ((c = dynamic_cast< TabBoxClientImpl* >(tabBox->activeClient()))) { + if (c->client()->resourceClass() == current->resourceClass()) { + return true; + } + } + return false; + default: // TabBoxConfig::AllWindowsAllApplications + return true; + } +} + +bool TabBoxHandlerImpl::checkMinimized(TabBoxClient* client) const +{ + switch (config().clientMinimizedMode()) { + case TabBoxConfig::ExcludeMinimizedClients: + return !client->isMinimized(); + case TabBoxConfig::OnlyMinimizedClients: + return client->isMinimized(); + default: // TabBoxConfig::IgnoreMinimizedStatus + return true; + } +} + +bool TabBoxHandlerImpl::checkMultiScreen(TabBoxClient* client) const +{ + Client* current = (static_cast< TabBoxClientImpl* >(client))->client(); Workspace* workspace = Workspace::self(); + + switch (config().clientMultiScreenMode()) { + case TabBoxConfig::IgnoreMultiScreen: + return true; + case TabBoxConfig::ExcludeCurrentScreenClients: + return current->screen() != workspace->activeScreen(); + default: // TabBoxConfig::OnlyCurrentScreenClients + return current->screen() == workspace->activeScreen(); + } +} + +TabBoxClient* TabBoxHandlerImpl::clientToAddToList(TabBoxClient* client, int desktop) const +{ Client* ret = NULL; Client* current = (static_cast< TabBoxClientImpl* >(client))->client(); - bool addClient = false; - bool applications = (config().clientListMode() == TabBoxConfig::AllDesktopsApplicationList || - config().clientListMode() == TabBoxConfig::CurrentDesktopApplicationList); - if (allDesktops) - addClient = true; - else - addClient = current->isOnDesktop(desktop); - addClient = addClient && current->isOnCurrentActivity(); + + bool addClient = checkDesktop(client, desktop) + && checkActivity(client) + && checkApplications(client) + && checkMinimized(client) + && checkMultiScreen(client); addClient = addClient && current->wantsTabFocus() && !current->skipSwitcher(); - addClient = addClient && !(current->isMinimized() && config().clientMinimizedMode() == TabBoxConfig::ExcludeMinimizedClients ); - addClient = addClient && !(!current->isMinimized() && config().clientMinimizedMode() == TabBoxConfig::OnlyMinimizedClients); if (addClient) { // don't add windows that have modal dialogs Client* modal = current->findModal(); @@ -147,21 +226,6 @@ TabBoxClient* TabBoxHandlerImpl::clientToAddToList(TabBoxClient* client, int des else { // nothing } - if (ret && applications) { - // check if the list already contains an entry of this application - foreach (TabBoxClient * tabBoxClient, clientList()) { - if (TabBoxClientImpl* c = dynamic_cast< TabBoxClientImpl* >(tabBoxClient)) { - if (c->client()->resourceClass() == ret->resourceClass()) { - ret = NULL; - break; - } - } - } - } - } - if (options->isSeparateScreenFocus()) { - if (current->screen() != workspace->activeScreen()) - ret = NULL; } if (ret) return ret->tabBoxClient(); @@ -307,27 +371,37 @@ TabBox::TabBox(QObject *parent) m_isShown = false; m_defaultConfig = TabBoxConfig(); m_defaultConfig.setTabBoxMode(TabBoxConfig::ClientTabBox); - m_defaultConfig.setClientListMode(TabBoxConfig::CurrentDesktopClientList); + m_defaultConfig.setClientDesktopMode(TabBoxConfig::OnlyCurrentDesktopClients); + m_defaultConfig.setClientActivitiesMode(TabBoxConfig::OnlyCurrentActivityClients); + m_defaultConfig.setClientApplicationsMode(TabBoxConfig::AllWindowsAllApplications); + m_defaultConfig.setClientMinimizedMode(TabBoxConfig::IgnoreMinimizedStatus); + m_defaultConfig.setShowDesktopMode(TabBoxConfig::DoNotShowDesktopClient); + m_defaultConfig.setClientMultiScreenMode(TabBoxConfig::OnlyCurrentScreenClients); m_defaultConfig.setClientSwitchingMode(TabBoxConfig::FocusChainSwitching); m_defaultConfig.setLayout(TabBoxConfig::VerticalLayout); m_alternativeConfig = TabBoxConfig(); m_alternativeConfig.setTabBoxMode(TabBoxConfig::ClientTabBox); - m_alternativeConfig.setClientListMode(TabBoxConfig::AllDesktopsClientList); + m_alternativeConfig.setClientDesktopMode(TabBoxConfig::AllDesktopsClients); + m_alternativeConfig.setClientActivitiesMode(TabBoxConfig::OnlyCurrentActivityClients); + m_alternativeConfig.setClientApplicationsMode(TabBoxConfig::AllWindowsAllApplications); + m_alternativeConfig.setClientMinimizedMode(TabBoxConfig::IgnoreMinimizedStatus); + m_alternativeConfig.setShowDesktopMode(TabBoxConfig::DoNotShowDesktopClient); + m_alternativeConfig.setClientMultiScreenMode(TabBoxConfig::OnlyCurrentScreenClients); m_alternativeConfig.setClientSwitchingMode(TabBoxConfig::FocusChainSwitching); m_alternativeConfig.setLayout(TabBoxConfig::VerticalLayout); m_desktopConfig = TabBoxConfig(); m_desktopConfig.setTabBoxMode(TabBoxConfig::DesktopTabBox); m_desktopConfig.setShowTabBox(true); - m_desktopConfig.setShowDesktop(false); + m_desktopConfig.setShowDesktopMode(TabBoxConfig::DoNotShowDesktopClient); m_desktopConfig.setDesktopSwitchingMode(TabBoxConfig::MostRecentlyUsedDesktopSwitching); m_desktopConfig.setLayout(TabBoxConfig::VerticalLayout); m_desktopListConfig = TabBoxConfig(); m_desktopListConfig.setTabBoxMode(TabBoxConfig::DesktopTabBox); m_desktopListConfig.setShowTabBox(true); - m_desktopListConfig.setShowDesktop(false); + m_desktopListConfig.setShowDesktopMode(TabBoxConfig::DoNotShowDesktopClient); m_desktopListConfig.setDesktopSwitchingMode(TabBoxConfig::StaticDesktopSwitching); m_desktopListConfig.setLayout(TabBoxConfig::VerticalLayout); m_tabBox = new TabBoxHandlerImpl(this); @@ -576,12 +650,20 @@ void TabBox::reconfigure() void TabBox::loadConfig(const KConfigGroup& config, TabBoxConfig& tabBoxConfig) { - tabBoxConfig.setClientListMode(TabBoxConfig::ClientListMode( - config.readEntry("ListMode", TabBoxConfig::defaultListMode()))); - tabBoxConfig.setClientSwitchingMode(TabBoxConfig::ClientSwitchingMode( - config.readEntry("SwitchingMode", TabBoxConfig::defaultSwitchingMode()))); + tabBoxConfig.setClientDesktopMode(TabBoxConfig::ClientDesktopMode( + config.readEntry("DesktopMode", TabBoxConfig::defaultDesktopMode()))); + tabBoxConfig.setClientActivitiesMode(TabBoxConfig::ClientActivitiesMode( + config.readEntry("ActivitiesMode", TabBoxConfig::defaultActivitiesMode()))); + tabBoxConfig.setClientApplicationsMode(TabBoxConfig::ClientApplicationsMode( + config.readEntry("ApplicationsMode", TabBoxConfig::defaultApplicationsMode()))); tabBoxConfig.setClientMinimizedMode(TabBoxConfig::ClientMinimizedMode( config.readEntry("MinimizedMode", TabBoxConfig::defaultMinimizedMode()))); + tabBoxConfig.setShowDesktopMode(TabBoxConfig::ShowDesktopMode( + config.readEntry("ShowDesktopMode", TabBoxConfig::defaultShowDesktopMode()))); + tabBoxConfig.setClientMultiScreenMode(TabBoxConfig::ClientMultiScreenMode( + config.readEntry("MultiScreenMode", TabBoxConfig::defaultMultiScreenMode()))); + tabBoxConfig.setClientSwitchingMode(TabBoxConfig::ClientSwitchingMode( + config.readEntry("SwitchingMode", TabBoxConfig::defaultSwitchingMode()))); tabBoxConfig.setShowOutline(config.readEntry("ShowOutline", TabBoxConfig::defaultShowOutline())); @@ -589,8 +671,6 @@ void TabBox::loadConfig(const KConfigGroup& config, TabBoxConfig& tabBoxConfig) TabBoxConfig::defaultShowTabBox())); tabBoxConfig.setHighlightWindows(config.readEntry("HighlightWindows", TabBoxConfig::defaultHighlightWindow())); - tabBoxConfig.setShowDesktop(config.readEntry("ShowDesktop", - TabBoxConfig::defaultShowDesktop())); tabBoxConfig.setLayoutName(config.readEntry("LayoutName", TabBoxConfig::defaultLayoutName())); } diff --git a/tabbox/tabbox.h b/tabbox/tabbox.h index 6d4e2b2479..c86a572850 100644 --- a/tabbox/tabbox.h +++ b/tabbox/tabbox.h @@ -56,7 +56,7 @@ public: virtual TabBoxClientList stackingOrder() const; virtual void raiseClient(TabBoxClient *client) const; virtual void restack(TabBoxClient *c, TabBoxClient *under); - virtual TabBoxClient* clientToAddToList(TabBoxClient* client, int desktop, bool allDesktops) const; + virtual TabBoxClient* clientToAddToList(TabBoxClient* client, int desktop) const; virtual TabBoxClient* desktopClient() const; virtual void hideOutline(); virtual void showOutline(const QRect &outline); @@ -64,6 +64,12 @@ public: virtual void activateAndClose(); private: + bool checkDesktop(TabBoxClient* client, int desktop) const; + bool checkActivity(TabBoxClient* client) const; + bool checkApplications(TabBoxClient* client) const; + bool checkMinimized(TabBoxClient* client) const; + bool checkMultiScreen(TabBoxClient* client) const; + TabBox* m_tabBox; }; diff --git a/tabbox/tabboxconfig.cpp b/tabbox/tabboxconfig.cpp index 9feaa16f45..42fdbcf398 100644 --- a/tabbox/tabboxconfig.cpp +++ b/tabbox/tabboxconfig.cpp @@ -33,15 +33,18 @@ public: , showOutline(TabBoxConfig::defaultShowOutline()) , tabBoxMode(TabBoxConfig::ClientTabBox) , layout(TabBoxConfig::defaultLayoutMode()) - , clientListMode(TabBoxConfig::defaultListMode()) - , clientSwitchingMode(TabBoxConfig::defaultSwitchingMode()) + , clientDesktopMode(TabBoxConfig::defaultDesktopMode()) + , clientActivitiesMode(TabBoxConfig::defaultActivitiesMode()) + , clientApplicationsMode(TabBoxConfig::defaultApplicationsMode()) , clientMinimizedMode(TabBoxConfig::defaultMinimizedMode()) + , showDesktopMode(TabBoxConfig::defaultShowDesktopMode()) + , clientMultiScreenMode(TabBoxConfig::defaultMultiScreenMode()) + , clientSwitchingMode(TabBoxConfig::defaultSwitchingMode()) , desktopSwitchingMode(TabBoxConfig::MostRecentlyUsedDesktopSwitching) , minWidth(TabBoxConfig::defaultMinWidth()) , minHeight(TabBoxConfig::defaultMinHeight()) , layoutName(TabBoxConfig::defaultLayoutName()) - , selectedItemLayoutName(TabBoxConfig::defaultSelectedItemLayoutName()) - , showDesktop(TabBoxConfig::defaultShowDesktop()) { + , selectedItemLayoutName(TabBoxConfig::defaultSelectedItemLayoutName()) { } ~TabBoxConfigPrivate() { } @@ -51,15 +54,18 @@ public: TabBoxConfig::TabBoxMode tabBoxMode; TabBoxConfig::LayoutMode layout; - TabBoxConfig::ClientListMode clientListMode; - TabBoxConfig::ClientSwitchingMode clientSwitchingMode; + TabBoxConfig::ClientDesktopMode clientDesktopMode; + TabBoxConfig::ClientActivitiesMode clientActivitiesMode; + TabBoxConfig::ClientApplicationsMode clientApplicationsMode; TabBoxConfig::ClientMinimizedMode clientMinimizedMode; + TabBoxConfig::ShowDesktopMode showDesktopMode; + TabBoxConfig::ClientMultiScreenMode clientMultiScreenMode; + TabBoxConfig::ClientSwitchingMode clientSwitchingMode; TabBoxConfig::DesktopSwitchingMode desktopSwitchingMode; int minWidth; int minHeight; QString layoutName; QString selectedItemLayoutName; - bool showDesktop; }; TabBoxConfig::TabBoxConfig() @@ -78,11 +84,13 @@ TabBoxConfig& TabBoxConfig::operator=(const KWin::TabBox::TabBoxConfig& object) d->highlightWindows = object.isHighlightWindows(); d->showOutline = object.isShowOutline(); d->tabBoxMode = object.tabBoxMode(); - d->showDesktop = object.isShowDesktop(); d->layout = object.layout(); - d->clientListMode = object.clientListMode(); - d->clientSwitchingMode = object.clientSwitchingMode(); + d->clientDesktopMode = object.clientDesktopMode(); + d->clientActivitiesMode = object.clientActivitiesMode(); + d->clientApplicationsMode = object.clientApplicationsMode(); d->clientMinimizedMode = object.clientMinimizedMode(); + d->showDesktopMode = object.showDesktopMode(); + d->clientMultiScreenMode = object.clientMultiScreenMode(); d->desktopSwitchingMode = object.desktopSwitchingMode(); d->selectedItemLayoutName = object.selectedItemLayoutName(); d->minWidth = object.minWidth(); @@ -141,24 +149,34 @@ TabBoxConfig::LayoutMode TabBoxConfig::layout() const return d->layout; } -TabBoxConfig::ClientListMode TabBoxConfig::clientListMode() const +TabBoxConfig::ClientDesktopMode TabBoxConfig::clientDesktopMode() const { - return d->clientListMode; + return d->clientDesktopMode; } -void TabBoxConfig::setClientListMode(ClientListMode listMode) +void TabBoxConfig::setClientDesktopMode(ClientDesktopMode desktopMode) { - d->clientListMode = listMode; + d->clientDesktopMode = desktopMode; } -TabBoxConfig::ClientSwitchingMode TabBoxConfig::clientSwitchingMode() const +TabBoxConfig::ClientActivitiesMode TabBoxConfig::clientActivitiesMode() const { - return d->clientSwitchingMode; + return d->clientActivitiesMode; } -void TabBoxConfig::setClientSwitchingMode(ClientSwitchingMode switchingMode) +void TabBoxConfig::setClientActivitiesMode(ClientActivitiesMode activitiesMode) { - d->clientSwitchingMode = switchingMode; + d->clientActivitiesMode = activitiesMode; +} + +TabBoxConfig::ClientApplicationsMode TabBoxConfig::clientApplicationsMode() const +{ + return d->clientApplicationsMode; +} + +void TabBoxConfig::setClientApplicationsMode(ClientApplicationsMode applicationsMode) +{ + d->clientApplicationsMode = applicationsMode; } TabBoxConfig::ClientMinimizedMode TabBoxConfig::clientMinimizedMode() const @@ -171,6 +189,36 @@ void TabBoxConfig::setClientMinimizedMode(ClientMinimizedMode minimizedMode) d->clientMinimizedMode = minimizedMode; } +TabBoxConfig::ShowDesktopMode TabBoxConfig::showDesktopMode() const +{ + return d->showDesktopMode; +} + +void TabBoxConfig::setShowDesktopMode(ShowDesktopMode showDesktopMode) +{ + d->showDesktopMode = showDesktopMode; +} + +TabBoxConfig::ClientMultiScreenMode TabBoxConfig::clientMultiScreenMode() const +{ + return d->clientMultiScreenMode; +} + +void TabBoxConfig::setClientMultiScreenMode(ClientMultiScreenMode multiScreenMode) +{ + d->clientMultiScreenMode = multiScreenMode; +} + +TabBoxConfig::ClientSwitchingMode TabBoxConfig::clientSwitchingMode() const +{ + return d->clientSwitchingMode; +} + +void TabBoxConfig::setClientSwitchingMode(ClientSwitchingMode switchingMode) +{ + d->clientSwitchingMode = switchingMode; +} + TabBoxConfig::DesktopSwitchingMode TabBoxConfig::desktopSwitchingMode() const { return d->desktopSwitchingMode; @@ -221,15 +269,5 @@ void TabBoxConfig::setSelectedItemLayoutName(const QString& name) d->selectedItemLayoutName = name; } -bool TabBoxConfig::isShowDesktop() const -{ - return d->showDesktop; -} - -void TabBoxConfig::setShowDesktop(bool show) -{ - d->showDesktop = show; -} - } // namespace TabBox } // namespace KWin diff --git a/tabbox/tabboxconfig.h b/tabbox/tabboxconfig.h index 32facde898..12b262c87a 100644 --- a/tabbox/tabboxconfig.h +++ b/tabbox/tabboxconfig.h @@ -61,14 +61,57 @@ public: HorizontalVerticalLayout ///< Items are laid out in a tabular. Number of columns might be greater by one than number of rows }; /** - * ClientListMode defines the mode used to create the TabBoxClient List - * in the TabBoxClientModel + * ClientDesktopMode defines whether windows from the current desktop or from all + * desktops are included in the TabBoxClient List in the TabBoxClientModel */ - enum ClientListMode { - CurrentDesktopClientList, ///< Only TabBoxClients on current desktop are included - AllDesktopsClientList, ///< TabBoxClients from all desktops are included. - CurrentDesktopApplicationList, ///< Only one TabBoxClient for each application on current desktop is included - AllDesktopsApplicationList ///< Only one TabBoxClient for each application is included + enum ClientDesktopMode { + AllDesktopsClients, ///< TabBoxClients from all desktops are included. + OnlyCurrentDesktopClients, ///< Only TabBoxClients on current desktop are included + ExcludeCurrentDesktopClients ///< Exclude TabBoxClients on current desktop + }; + /** + * ClientActivitiesMode defines whether windows from the current activity or from all + * activities are included in the TabBoxClient List in the TabBoxClientModel + */ + enum ClientActivitiesMode { + AllActivitiesClients, ///< TabBoxClients from all Activities are included. + OnlyCurrentActivityClients, ///< Only TabBoxClients on current activity are included + ExcludeCurrentActivityClients ///< Exclude TabBoxClients on current activity + }; + /** + * ClientApplicationsMode defines which windows from the current application or from all + * applications are included in the TabBoxClient List in the TabBoxClientModel + */ + enum ClientApplicationsMode { + AllWindowsAllApplications, ///< TabBoxClients from all applications are included + OneWindowPerApplication, ///< Only one TabBoxClient for each application is included + AllWindowsCurrentApplication ///< Only TabBoxClients for the current application are included + }; + /** + * ClientMinimizedMode defines which windows are included in the TabBoxClient List + * in the TabBoxClientModel based on whether they are minimized or not + */ + enum ClientMinimizedMode { + IgnoreMinimizedStatus, ///< TabBoxClients are included no matter they are minimized or not + ExcludeMinimizedClients, ///< Exclude minimized TabBoxClients + OnlyMinimizedClients ///< Only minimized TabBoxClients are included + }; + /** + * ShowDesktopMode defines whether a TabBoxClient representing the desktop + * is included in the TabBoxClient List in the TabBoxClientModel + */ + enum ShowDesktopMode { + DoNotShowDesktopClient, ///< A TabBoxClient representing the desktop is not included + ShowDesktopClient ///< A TabBoxClient representing the desktop is included + }; + /** + * ClientActivitiesMode defines whether windows from the current activity or from all + * activities are included in the TabBoxClient List in the TabBoxClientModel + */ + enum ClientMultiScreenMode { + IgnoreMultiScreen, ///< TabBoxClients are included independently of the screen they are on + OnlyCurrentScreenClients, ///< Only TabBoxClients on current screen are included + ExcludeCurrentScreenClients ///< Exclude TabBoxClients from the current screen }; /** * ClientSwitchingMode defines the sorting of the TabBoxClients in the @@ -79,15 +122,6 @@ public: StackingOrderSwitching ///< Sort by current stacking order }; /** - * ClientMinimizedMode defines the mode used to create the TabBoxClient List - * in the TabBoxClientModel - */ - enum ClientMinimizedMode { - IgnoreMinimizedStatus, ///< TabBoxClients are included no matter they are minimized or not - ExcludeMinimizedClients, ///< Exclude minimized TabBoxClients - OnlyMinimizedClients ///< Only minimized TabBoxClients are included - }; - /** * DesktopSwitchingMode defines the sorting of the desktops in the * TabBoxDesktopModel. */ @@ -141,19 +175,26 @@ public: */ LayoutMode layout() const; /** - * @return The current ClientListMode + * @return The current ClientDesktopMode * This option only applies for TabBoxMode ClientTabBox. - * @see setClientListMode - * @see defaultListMode + * @see setClientDesktopMode + * @see defaultDesktopMode */ - ClientListMode clientListMode() const; + ClientDesktopMode clientDesktopMode() const; /** - * @return The current ClientSwitchingMode. + * @return The current ClientActivitiesMode * This option only applies for TabBoxMode ClientTabBox. - * @see setClientSwitchingMode - * @see defaultSwitchingMode + * @see setClientActivitiesMode + * @see defaultActivitiesMode */ - ClientSwitchingMode clientSwitchingMode() const; + ClientActivitiesMode clientActivitiesMode() const; + /** + * @return The current ClientApplicationsMode + * This option only applies for TabBoxMode ClientTabBox. + * @see setClientApplicationsMode + * @see defaultApplicationsMode + */ + ClientApplicationsMode clientApplicationsMode() const; /** * @return The current ClientMinimizedMode * This option only applies for TabBoxMode ClientTabBox. @@ -162,6 +203,27 @@ public: */ ClientMinimizedMode clientMinimizedMode() const; /** + * @return The current ShowDesktopMode + * This option only applies for TabBoxMode ClientTabBox. + * @see setShowDesktopMode + * @see defaultShowDesktopMode + */ + ShowDesktopMode showDesktopMode() const; + /** + * @return The current ClientMultiScreenMode + * This option only applies for TabBoxMode ClientTabBox. + * @see setClientMultiScreenMode + * @see defaultMultiScreenMode + */ + ClientMultiScreenMode clientMultiScreenMode() const; + /** + * @return The current ClientSwitchingMode. + * This option only applies for TabBoxMode ClientTabBox. + * @see setClientSwitchingMode + * @see defaultSwitchingMode + */ + ClientSwitchingMode clientSwitchingMode() const; + /** * @return The current DesktopSwitchingMode * This option only applies for TabBoxMode DesktopTabBox. * @see setDesktopSwitchingMode @@ -191,11 +253,6 @@ public: * @see setlayoutName */ QString& selectedItemLayoutName() const; - /** - * @return If an item for minimizing all windows to the desktop should be included. - * @see setShowDesktop - */ - bool isShowDesktop() const; // setters /** @@ -227,17 +284,23 @@ public: */ void setLayout(LayoutMode layout); /** - * @param listMode The new ClientListMode to be used. + * @param desktopMode The new ClientDesktopMode to be used. * This option only applies for TabBoxMode ClientTabBox. - * @see clientListMode + * @see clientDesktopMode */ - void setClientListMode(ClientListMode listMode); + void setClientDesktopMode(ClientDesktopMode desktopMode); /** - * @param switchingMode The new ClientSwitchingMode to be used. + * @param activitiesMode The new ClientActivitiesMode to be used. * This option only applies for TabBoxMode ClientTabBox. - * @see clientSwitchingMode + * @see clientActivitiesMode */ - void setClientSwitchingMode(ClientSwitchingMode switchingMode); + void setClientActivitiesMode(ClientActivitiesMode activitiesMode); + /** + * @param applicationsMode The new ClientApplicationsMode to be used. + * This option only applies for TabBoxMode ClientTabBox. + * @see clientApplicationsMode + */ + void setClientApplicationsMode(ClientApplicationsMode applicationsMode); /** * @param minimizedMode The new ClientMinimizedMode to be used. * This option only applies for TabBoxMode ClientTabBox. @@ -245,6 +308,24 @@ public: */ void setClientMinimizedMode(ClientMinimizedMode minimizedMode); /** + * @param showDesktopMode The new ShowDesktopMode to be used. + * This option only applies for TabBoxMode ClientTabBox. + * @see showDesktopMode + */ + void setShowDesktopMode(ShowDesktopMode showDesktopMode); + /** + * @param multiScreenMode The new ClientMultiScreenMode to be used. + * This option only applies for TabBoxMode ClientTabBox. + * @see clientMultiScreenMode + */ + void setClientMultiScreenMode(ClientMultiScreenMode multiScreenMode); + /** + * @param switchingMode The new ClientSwitchingMode to be used. + * This option only applies for TabBoxMode ClientTabBox. + * @see clientSwitchingMode + */ + void setClientSwitchingMode(ClientSwitchingMode switchingMode); + /** * @param switchingMode The new DesktopSwitchingMode to be used. * This option only applies for TabBoxMode DesktopTabBox. * @see desktopSwitchingMode @@ -270,22 +351,29 @@ public: * @see selectedItemLayoutName */ void setSelectedItemLayoutName(const QString& name); - /** - * @param show Include item to minimize all windows to the desktop - * @see isShowDesktop - */ - void setShowDesktop(bool show); // some static methods to access default values - static ClientListMode defaultListMode() { - return CurrentDesktopClientList; + static ClientDesktopMode defaultDesktopMode() { + return OnlyCurrentDesktopClients; } - static ClientSwitchingMode defaultSwitchingMode() { - return FocusChainSwitching; + static ClientActivitiesMode defaultActivitiesMode() { + return OnlyCurrentActivityClients; + } + static ClientApplicationsMode defaultApplicationsMode() { + return AllWindowsAllApplications; } static ClientMinimizedMode defaultMinimizedMode() { return IgnoreMinimizedStatus; } + static ShowDesktopMode defaultShowDesktopMode() { + return DoNotShowDesktopClient; + } + static ClientMultiScreenMode defaultMultiScreenMode() { + return OnlyCurrentScreenClients; + } + static ClientSwitchingMode defaultSwitchingMode() { + return FocusChainSwitching; + } static LayoutMode defaultLayoutMode() { return VerticalLayout; } @@ -310,9 +398,6 @@ public: static QString defaultSelectedItemLayoutName() { return QString("Text"); } - static bool defaultShowDesktop() { - return false; - } private: TabBoxConfigPrivate* d; }; diff --git a/tabbox/tabboxhandler.h b/tabbox/tabboxhandler.h index 27b475a8ef..1a2a0c6dad 100644 --- a/tabbox/tabboxhandler.h +++ b/tabbox/tabboxhandler.h @@ -167,7 +167,7 @@ public: * @param allDesktops Add clients from all desktops or only from current * @return The client to be included in the list or NULL if it isn't to be included */ - virtual TabBoxClient* clientToAddToList(TabBoxClient* client, int desktop, bool allDesktops) const = 0; + virtual TabBoxClient* clientToAddToList(TabBoxClient* client, int desktop) const = 0; /** * @return The first desktop window in the stacking order. */