summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_win.cpp
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-06-25 09:38:28 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-06-25 09:38:28 (GMT)
commit6198e74a0b482c332f7b6432b817831560fe21ec (patch)
tree7c188512b4932a06f6b3b8b52ca727a8c7404418 /src/gui/kernel/qapplication_win.cpp
parent476ab684a7d2c2ede624111bacb59de6905ef123 (diff)
downloadQt-6198e74a0b482c332f7b6432b817831560fe21ec.zip
Qt-6198e74a0b482c332f7b6432b817831560fe21ec.tar.gz
Qt-6198e74a0b482c332f7b6432b817831560fe21ec.tar.bz2
Cannot move fixed size windows using titlebar (only on top edge)
WM_NCHITTEST has to return the location type based on the position, instead of returning just true or false. Reviewed-by: Marius Storm-Olsen
Diffstat (limited to 'src/gui/kernel/qapplication_win.cpp')
-rw-r--r--src/gui/kernel/qapplication_win.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 0c74cfa..324fac7 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -1905,10 +1905,14 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
// don't show resize-cursors for fixed-size widgets
QRect fs = widget->frameStrut();
if (!widget->isMinimized()) {
+ if (widget->minimumHeight() == widget->maximumHeight()) {
+ if (pos.y() < -(fs.top() - fs.left()))
+ return HTCAPTION;
+ if (pos.y() >= widget->height())
+ return HTBORDER;
+ }
if (widget->minimumWidth() == widget->maximumWidth() && (pos.x() < 0 || pos.x() >= widget->width()))
- break;
- if (widget->minimumHeight() == widget->maximumHeight() && (pos.y() < -(fs.top() - fs.left()) || pos.y() >= widget->height()))
- break;
+ return HTBORDER;
}
}