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:
parent
fcad1c762b
commit
9d293e24a0
@ -2277,6 +2277,16 @@ bool QWindowsWindow::startSystemResize(const QPoint &, Qt::Corner corner)
|
|||||||
return true;
|
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)
|
void QWindowsWindow::setFrameStrutEventsEnabled(bool enabled)
|
||||||
{
|
{
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
|
@ -269,6 +269,7 @@ public:
|
|||||||
inline bool hasMouseCapture() const { return GetCapture() == m_data.hwnd; }
|
inline bool hasMouseCapture() const { return GetCapture() == m_data.hwnd; }
|
||||||
|
|
||||||
bool startSystemResize(const QPoint &pos, Qt::Corner corner) override;
|
bool startSystemResize(const QPoint &pos, Qt::Corner corner) override;
|
||||||
|
bool startSystemMove(const QPoint &pos) override;
|
||||||
|
|
||||||
void setFrameStrutEventsEnabled(bool enabled) override;
|
void setFrameStrutEventsEnabled(bool enabled) override;
|
||||||
bool frameStrutEventsEnabled() const override { return testFlag(FrameStrutEventsEnabled); }
|
bool frameStrutEventsEnabled() const override { return testFlag(FrameStrutEventsEnabled); }
|
||||||
|
Loading…
Reference in New Issue
Block a user