From c4c3eb90fba9d857dc929adfb72388597e323398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 3 May 2013 19:13:12 +0200 Subject: [PATCH] Remove outdated showWindowMenu(At) functions Instead of wrapping for exactly one case let's just use the proper function calls and get rid of all those methods marked as "remove KDE4" and "backwards compatibility". REVIEW: 110292 --- dbusinterface.cpp | 5 ++++- useractions.cpp | 10 ++-------- workspace.h | 19 ------------------- 3 files changed, 6 insertions(+), 28 deletions(-) diff --git a/dbusinterface.cpp b/dbusinterface.cpp index 8800b79f91..5eacd706d3 100644 --- a/dbusinterface.cpp +++ b/dbusinterface.cpp @@ -154,7 +154,10 @@ void DBusInterface::doNotManage(const QString &name) void DBusInterface::showWindowMenuAt(qlonglong winId, int x, int y) { - Workspace::self()->showWindowMenuAt(winId, x, y); + Q_UNUSED(winId) + Q_UNUSED(x) + Q_UNUSED(y) + Workspace::self()->slotWindowOperations(); } // wrap returning methods with no arguments to COMPOSITOR diff --git a/useractions.cpp b/useractions.cpp index 753b8c16cb..dc7257344a 100755 --- a/useractions.cpp +++ b/useractions.cpp @@ -1205,7 +1205,7 @@ bool Client::performMouseCommand(Options::MouseCommand command, const QPoint &gl case Options::MouseOperationsMenu: if (isActive() && options->isClickRaise()) autoRaise(); - workspace()->showWindowMenu(globalPos, this); + workspace()->showWindowMenu(QRect(globalPos, globalPos), this); break; case Options::MouseToggleRaiseAndLower: workspace()->raiseOrLowerClient(this); @@ -1357,12 +1357,6 @@ bool Client::performMouseCommand(Options::MouseCommand command, const QPoint &gl return replay; } -// KDE4 remove me -void Workspace::showWindowMenuAt(unsigned long, int, int) -{ - slotWindowOperations(); -} - void Workspace::slotActivateAttentionWindow() { if (attention_chain.count() > 0) @@ -1793,7 +1787,7 @@ void Workspace::slotWindowOperations() if (!active_client) return; QPoint pos = active_client->pos() + active_client->clientPos(); - showWindowMenu(pos.x(), pos.y(), active_client); + showWindowMenu(QRect(pos, pos), active_client); } void Workspace::showWindowMenu(const QRect &pos, Client* cl) diff --git a/workspace.h b/workspace.h index 12e9f8ea2f..71edcd7cc7 100644 --- a/workspace.h +++ b/workspace.h @@ -213,20 +213,11 @@ public: void windowToNextDesktop(Client* c); void sendClientToScreen(Client* c, int screen); - // KDE4 remove me - And it's also in the DCOP interface :( - void showWindowMenuAt(unsigned long id, int x, int y); - - /** * Shows the menu operations menu for the client and makes it active if * it's not already. */ void showWindowMenu(const QRect& pos, Client* cl); - /** - * Backwards compatibility. - */ - void showWindowMenu(int x, int y, Client* cl); - void showWindowMenu(QPoint pos, Client* cl); const UserActionsMenu *userActionsMenu() const { return m_userActionsMenu; } @@ -627,16 +618,6 @@ inline const ToplevelList& Workspace::stackingOrder() const return stacking_order; } -inline void Workspace::showWindowMenu(QPoint pos, Client* cl) -{ - showWindowMenu(QRect(pos, pos), cl); -} - -inline void Workspace::showWindowMenu(int x, int y, Client* cl) -{ - showWindowMenu(QRect(QPoint(x, y), QPoint(x, y)), cl); -} - inline void Workspace::setWasUserInteraction() { was_user_interaction = true;