From 6198e74a0b482c332f7b6432b817831560fe21ec Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Thu, 25 Jun 2009 11:38:28 +0200 Subject: 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 --- src/gui/kernel/qapplication_win.cpp | 10 +++++++--- 1 file 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; } } -- cgit v0.12