Windows QPA: Implement QPlatformWindow::startSystemMove()

Task-number: QTBUG-58044
Change-Id: I15639d505683159b4cc31d762cb0bebbfc57e594
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
Alexander Volkov 2018-01-30 12:51:19 +03:00
parent fcad1c762b
commit 9d293e24a0
2 changed files with 11 additions and 0 deletions

View File

@ -2277,6 +2277,16 @@ bool QWindowsWindow::startSystemResize(const QPoint &, Qt::Corner corner)
return true;
}
bool QWindowsWindow::startSystemMove(const QPoint &)
{
if (!GetSystemMenu(m_data.hwnd, FALSE))
return false;
ReleaseCapture();
PostMessage(m_data.hwnd, WM_SYSCOMMAND, 0xF012 /*SC_DRAGMOVE*/, 0);
return true;
}
void QWindowsWindow::setFrameStrutEventsEnabled(bool enabled)
{
if (enabled) {

View File

@ -269,6 +269,7 @@ public:
inline bool hasMouseCapture() const { return GetCapture() == m_data.hwnd; }
bool startSystemResize(const QPoint &pos, Qt::Corner corner) override;
bool startSystemMove(const QPoint &pos) override;
void setFrameStrutEventsEnabled(bool enabled) override;
bool frameStrutEventsEnabled() const override { return testFlag(FrameStrutEventsEnabled); }