Move circulateDesktopApplications into DBusInterface
It is not used anywhere inside KWin at all and the DBus method is not used anywhere inside KDE's repositories (according to lxr). Because of that marked as deprecated and going to die with Qt 5. REVIEW: 107406
This commit is contained in:
parent
5a2504b19e
commit
533e3e5adf
4 changed files with 20 additions and 16 deletions
|
@ -21,6 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// own
|
||||
#include "dbusinterface.h"
|
||||
// kwin
|
||||
// TODO: remove together with deprecated methods
|
||||
#include "client.h"
|
||||
#include "composite.h"
|
||||
#include "effects.h"
|
||||
#include "kwinadaptor.h"
|
||||
|
@ -48,6 +50,21 @@ DBusInterface::~DBusInterface()
|
|||
{
|
||||
}
|
||||
|
||||
void DBusInterface::circulateDesktopApplications()
|
||||
{
|
||||
Workspace *ws = Workspace::self();
|
||||
const QList<Client*> &desktops = ws->desktopList();
|
||||
if (desktops.count() > 1) {
|
||||
bool change_active = ws->activeClient()->isDesktop();
|
||||
ws->raiseClient(ws->findDesktop(false, currentDesktop()));
|
||||
if (change_active) // if the previously topmost Desktop was active, activate this new one
|
||||
ws->activateClient(ws->findDesktop(true, currentDesktop()));
|
||||
}
|
||||
// if there's no active client, make desktop the active one
|
||||
if (desktops.count() > 0 && ws->activeClient() == NULL && ws->mostRecentlyActivatedClient() == NULL)
|
||||
ws->activateClient(ws->findDesktop(true, currentDesktop()));
|
||||
}
|
||||
|
||||
// wrap void methods with no arguments to Workspace
|
||||
#define WRAP(name) \
|
||||
void DBusInterface::name() \
|
||||
|
@ -56,7 +73,6 @@ void DBusInterface::name() \
|
|||
}
|
||||
|
||||
WRAP(cascadeDesktop)
|
||||
WRAP(circulateDesktopApplications)
|
||||
WRAP(killWindow)
|
||||
WRAP(nextDesktop)
|
||||
WRAP(previousDesktop)
|
||||
|
|
|
@ -59,6 +59,9 @@ public:
|
|||
public: // PROPERTIES
|
||||
public Q_SLOTS: // METHODS
|
||||
Q_NOREPLY void cascadeDesktop();
|
||||
/**
|
||||
* @deprecated
|
||||
**/
|
||||
void circulateDesktopApplications();
|
||||
int currentDesktop();
|
||||
QList<int> decorationSupportedColors();
|
||||
|
|
14
layers.cpp
14
layers.cpp
|
@ -510,20 +510,6 @@ void Workspace::restoreSessionStackingOrder(Client* c)
|
|||
unconstrained_stacking_order.append(c);
|
||||
}
|
||||
|
||||
void Workspace::circulateDesktopApplications()
|
||||
{
|
||||
if (desktops.count() > 1) {
|
||||
bool change_active = activeClient()->isDesktop();
|
||||
raiseClient(findDesktop(false, currentDesktop()));
|
||||
if (change_active) // if the previously topmost Desktop was active, activate this new one
|
||||
activateClient(findDesktop(true, currentDesktop()));
|
||||
}
|
||||
// if there's no active client, make desktop the active one
|
||||
if (desktops.count() > 0 && activeClient() == NULL && should_get_focus.count() == 0)
|
||||
activateClient(findDesktop(true, currentDesktop()));
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
Returns a stacking order based upon \a list that fulfills certain contained.
|
||||
*/
|
||||
|
|
|
@ -458,7 +458,6 @@ public:
|
|||
QList<int> decorationSupportedColors() const;
|
||||
void nextDesktop();
|
||||
void previousDesktop();
|
||||
void circulateDesktopApplications();
|
||||
bool waitForCompositingSetup();
|
||||
bool stopActivity(const QString &id);
|
||||
bool startActivity(const QString &id);
|
||||
|
|
Loading…
Reference in a new issue