Add a QRect to showWindowMenu

This is so we don't have to rely on the cursor position for the popup

BUG: 393163
This commit is contained in:
Xaver Hugl 2020-11-22 21:47:31 +00:00 committed by David Edmundson
parent 5e60e64a5d
commit 8f104815e8
4 changed files with 6 additions and 6 deletions

View file

@ -226,10 +226,9 @@ void DecoratedClientImpl::requestHideToolTip()
m_toolTipShowing = false;
}
void DecoratedClientImpl::requestShowWindowMenu()
void DecoratedClientImpl::requestShowWindowMenu(const QRect &rect)
{
// TODO: add rect to requestShowWindowMenu
Workspace::self()->showWindowMenu(QRect(Cursors::self()->mouse()->pos(), Cursors::self()->mouse()->pos()), m_client);
Workspace::self()->showWindowMenu(QRect(m_client->pos() + rect.topLeft(), m_client->pos() + rect.bottomRight()), m_client);
}
void DecoratedClientImpl::requestShowApplicationMenu(const QRect &rect, int actionId)

View file

@ -70,7 +70,7 @@ public:
void requestContextHelp() override;
void requestToggleMaximization(Qt::MouseButtons buttons) override;
void requestMinimize() override;
void requestShowWindowMenu() override;
void requestShowWindowMenu(const QRect &rect) override;
void requestShowApplicationMenu(const QRect &rect, int actionId) override;
void requestToggleKeepAbove() override;
void requestToggleKeepBelow() override;

View file

@ -391,8 +391,9 @@ void PreviewClient::requestToggleKeepBelow()
setKeepBelow(!isKeepBelow());
}
void PreviewClient::requestShowWindowMenu()
void PreviewClient::requestShowWindowMenu(const QRect &rect)
{
Q_UNUSED(rect)
emit showWindowMenuRequested();
}

View file

@ -93,7 +93,7 @@ public:
void requestToggleKeepAbove() override;
void requestToggleKeepBelow() override;
void requestToggleShade() override;
void requestShowWindowMenu() override;
void requestShowWindowMenu(const QRect &rect) override;
void requestShowApplicationMenu(const QRect &rect, int actionId) override;
void requestToggleOnAllDesktops() override;