diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-09-04 14:33:40 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-09-04 14:33:40 +0200 |
commit | f255b1e8e297e7e1363921580007145cff574e0d (patch) | |
tree | 9a799be282e6c0d6544d9f8c872073f83e6c0475 /src/plugins/platforms/windows/qwindowswindow.cpp | |
parent | 7e8705f6632428a8d9a937ab5fe087999347b3dd (diff) | |
parent | bf8fcab8bb92ff534c5cec048d6dbebb3b73a348 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: I54741635460bb2d8f3fd0be535ee1968d6c442bb
Diffstat (limited to 'src/plugins/platforms/windows/qwindowswindow.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index e80eefc34d..0a97305dd4 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -2674,7 +2674,8 @@ bool QWindowsWindow::handleNonClientHitTest(const QPoint &globalPos, LRESULT *re // QTBUG-32663, suppress resize cursor for fixed size windows. const QWindow *w = window(); if (!w->isTopLevel() // Task 105852, minimized windows need to respond to user input. - || !(m_windowState & ~Qt::WindowActive) + || (m_windowState != Qt::WindowNoState) + || !isActive() || (m_data.flags & Qt::FramelessWindowHint)) { return false; } @@ -2694,12 +2695,10 @@ bool QWindowsWindow::handleNonClientHitTest(const QPoint &globalPos, LRESULT *re return true; } if (localPos.y() < 0) { - const QMargins margins = frameMargins(); - const int topResizeBarPos = margins.left() - margins.top(); - if (localPos.y() < topResizeBarPos) { + const int topResizeBarPos = -frameMargins().top(); + if (localPos.y() >= topResizeBarPos) *result = HTCAPTION; // Extend caption over top resize bar, let's user move the window. - return true; - } + return true; } } if (fixedWidth && (localPos.x() < 0 || localPos.x() >= size.width())) { |