From 65130f85e615331c5f5a1f08292efda17179b3c6 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 8 Nov 2022 19:51:48 +0200 Subject: [PATCH] Port Workspace from Window::clientPos() --- src/useractions.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/useractions.cpp b/src/useractions.cpp index 2cb241f7bd..9bd77dc07c 100644 --- a/src/useractions.cpp +++ b/src/useractions.cpp @@ -1141,7 +1141,8 @@ void Workspace::setupWindowShortcut(Window *window) connect(m_windowKeysDialog, &ShortcutDialog::dialogDone, this, &Workspace::setupWindowShortcutDone); QRect r = clientArea(ScreenArea, window).toRect(); QSize size = m_windowKeysDialog->sizeHint(); - QPointF pos = window->pos() + window->clientPos(); + QPointF pos(window->frameGeometry().left() + window->frameMargins().left(), + window->frameGeometry().top() + window->frameMargins().top()); if (pos.x() + size.width() >= r.right()) { pos.setX(r.right() - size.width()); } @@ -1723,7 +1724,8 @@ void Workspace::slotWindowOperations() if (!m_activeWindow) { return; } - QPoint pos = m_activeWindow->pos().toPoint() + m_activeWindow->clientPos().toPoint(); + const QPoint pos(m_activeWindow->frameGeometry().left() + m_activeWindow->frameMargins().left(), + m_activeWindow->frameGeometry().top() + m_activeWindow->frameMargins().top()); showWindowMenu(QRect(pos, pos), m_activeWindow); }