diff --git a/src/Window.cpp b/src/Window.cpp index 1ebfdce6..afac4f27 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -42,3 +42,7 @@ void Window::startSystemMove() qFatal("Not needed in this platform"); } +QPoint Window::framePosition() const +{ + return frameGeometry().topLeft(); +} diff --git a/src/Window.h b/src/Window.h index 4e2ed00c..43ba09aa 100644 --- a/src/Window.h +++ b/src/Window.h @@ -52,6 +52,9 @@ public: /// This ignores any frame (native decos the window has) virtual void setPosition(QPoint targetPos) = 0; + /// @brif Returns the position of the top-left corner, including native frame. + QPoint framePosition() const; + /// @brief Sets the position of the window at targetPos virtual void setFramePosition(QPoint targetPos) = 0; diff --git a/src/qtcommon/Window_qt.cpp b/src/qtcommon/Window_qt.cpp index 96d0072b..4cdbbbe5 100644 --- a/src/qtcommon/Window_qt.cpp +++ b/src/qtcommon/Window_qt.cpp @@ -81,6 +81,7 @@ void Window_qt::setFramePosition(QPoint targetPos) m_window->setFramePosition(targetPos); } +// TODOv2: this is setting the frame position ? void Window_qt::setPosition(QPoint targetPos) { m_window->setFramePosition(targetPos);