Index: src/kernel/qapplication_win.cpp
===================================================================
RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qapplication_win.cpp,v
retrieving revision 1.1.2.30.2.62
diff -u -p -r1.1.2.30.2.62 qapplication_win.cpp
--- src/kernel/qapplication_win.cpp	29 Apr 2005 13:29:11 -0000	1.1.2.30.2.62
+++ src/kernel/qapplication_win.cpp	5 May 2005 18:19:13 -0000
@@ -3592,10 +3592,27 @@ static LRESULT CALLBACK qt_window_proced
             if ( widget ) {
                 QSize minSize = widget->minimumSize ();
                 QSize maxSize = widget->maximumSize ();
-                minMaxInfo->ptMaxTrackSize.x = maxSize.width();
-                minMaxInfo->ptMaxTrackSize.y = maxSize.height();
-                minMaxInfo->ptMinTrackSize.x = minSize.width();
-                minMaxInfo->ptMinTrackSize.y = minSize.height();
+                DWORD dwStyle = QT_WA_INLINE(
+                    GetWindowLongW( widget->winId(), GWL_STYLE ),
+                    GetWindowLongA( widget->winId(), GWL_STYLE ) );
+                DWORD dwExtStyle = QT_WA_INLINE(
+                    GetWindowLongW( widget->winId(), GWL_EXSTYLE ),
+                    GetWindowLongA( widget->winId(), GWL_EXSTYLE ) );
+                RECT rect;
+                rect.left = 0;
+                rect.top = 0;
+                rect.right = minSize.width();
+                rect.bottom = minSize.height();
+                AdjustWindowRectEx( &rect, dwStyle, FALSE, dwExtStyle );
+                minMaxInfo->ptMinTrackSize.x = rect.right - rect.left;
+                minMaxInfo->ptMinTrackSize.y = rect.bottom - rect.top;
+                rect.left = 0;
+                rect.top = 0;
+                rect.right = maxSize.width();
+                rect.bottom = maxSize.height();
+                AdjustWindowRectEx( &rect, dwStyle, FALSE, dwExtStyle );
+                minMaxInfo->ptMaxTrackSize.x = rect.right - rect.left;
+                minMaxInfo->ptMaxTrackSize.y = rect.bottom - rect.top;
             }
             return 0;
         }
Index: src/kernel/qwidget_win.cpp
===================================================================
RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qwidget_win.cpp,v
retrieving revision 1.1.2.15.2.36
diff -u -p -r1.1.2.15.2.36 qwidget_win.cpp
--- src/kernel/qwidget_win.cpp	23 Apr 2005 15:28:00 -0000	1.1.2.15.2.36
+++ src/kernel/qwidget_win.cpp	5 May 2005 18:19:29 -0000
@@ -259,8 +259,7 @@ void QWidget::create( WId window, bool i
         qDebug ( "QWidget::create window Rect before AdjustRect: %ld, %ld - %ld,%ld", rcWnd.left, rcWnd.top, rcWnd.right, rcWnd.bottom );
 #endif
 
-        if ( isTopLevel() && !isPopup() && !testWFlags( WStyle_NoBorder ) )
-            AdjustWindowRect( &rcWnd, WS_CAPTION, FALSE );
+        AdjustWindowRectEx( &rcWnd, dwStyle, FALSE, dwExtStyle );
 #ifdef DEBUG_QWIDGET
 
         qDebug ( "QWidget::create window Rect after AdjustRect: %ld, %ld - %ld,%ld", rcWnd.left, rcWnd.top, rcWnd.right, rcWnd.bottom );
