Commit 8f104815 authored by Xaver Hugl's avatar Xaver Hugl Committed by David Edmundson
Browse files

Add a QRect to showWindowMenu

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

BUG: 393163
parent 5e60e64a
...@@ -226,10 +226,9 @@ void DecoratedClientImpl::requestHideToolTip() ...@@ -226,10 +226,9 @@ void DecoratedClientImpl::requestHideToolTip()
m_toolTipShowing = false; m_toolTipShowing = false;
} }
void DecoratedClientImpl::requestShowWindowMenu() void DecoratedClientImpl::requestShowWindowMenu(const QRect &rect)
{ {
// TODO: add rect to requestShowWindowMenu Workspace::self()->showWindowMenu(QRect(m_client->pos() + rect.topLeft(), m_client->pos() + rect.bottomRight()), m_client);
Workspace::self()->showWindowMenu(QRect(Cursors::self()->mouse()->pos(), Cursors::self()->mouse()->pos()), m_client);
} }
void DecoratedClientImpl::requestShowApplicationMenu(const QRect &rect, int actionId) void DecoratedClientImpl::requestShowApplicationMenu(const QRect &rect, int actionId)
......
...@@ -70,7 +70,7 @@ public: ...@@ -70,7 +70,7 @@ public:
void requestContextHelp() override; void requestContextHelp() override;
void requestToggleMaximization(Qt::MouseButtons buttons) override; void requestToggleMaximization(Qt::MouseButtons buttons) override;
void requestMinimize() override; void requestMinimize() override;
void requestShowWindowMenu() override; void requestShowWindowMenu(const QRect &rect) override;
void requestShowApplicationMenu(const QRect &rect, int actionId) override; void requestShowApplicationMenu(const QRect &rect, int actionId) override;
void requestToggleKeepAbove() override; void requestToggleKeepAbove() override;
void requestToggleKeepBelow() override; void requestToggleKeepBelow() override;
......
...@@ -391,8 +391,9 @@ void PreviewClient::requestToggleKeepBelow() ...@@ -391,8 +391,9 @@ void PreviewClient::requestToggleKeepBelow()
setKeepBelow(!isKeepBelow()); setKeepBelow(!isKeepBelow());
} }
void PreviewClient::requestShowWindowMenu() void PreviewClient::requestShowWindowMenu(const QRect &rect)
{ {
Q_UNUSED(rect)
emit showWindowMenuRequested(); emit showWindowMenuRequested();
} }
......
...@@ -93,7 +93,7 @@ public: ...@@ -93,7 +93,7 @@ public:
void requestToggleKeepAbove() override; void requestToggleKeepAbove() override;
void requestToggleKeepBelow() override; void requestToggleKeepBelow() override;
void requestToggleShade() override; void requestToggleShade() override;
void requestShowWindowMenu() override; void requestShowWindowMenu(const QRect &rect) override;
void requestShowApplicationMenu(const QRect &rect, int actionId) override; void requestShowApplicationMenu(const QRect &rect, int actionId) override;
void requestToggleOnAllDesktops() override; void requestToggleOnAllDesktops() override;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment