Index: dll/win32/uxtheme/nonclient.c
===================================================================
--- dll/win32/uxtheme/nonclient.c	(revision 67558)
+++ dll/win32/uxtheme/nonclient.c	(working copy)
@@ -447,6 +447,31 @@
     /* Now the other bit of the frame */
     if (context->wi.dwStyle & (WS_DLGFRAME | WS_BORDER) || context->wi.dwExStyle & WS_EX_DLGMODALFRAME)
     {
+        INT Width = GetSystemMetrics(SM_CXDLGFRAME);
+        INT Height = GetSystemMetrics(SM_CYDLGFRAME);
+
+        SelectObject(context->hDC, GetSysColorBrush(
+            (context->wi.dwExStyle & (WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE)) ? COLOR_3DFACE :
+            (context->wi.dwExStyle & WS_EX_STATICEDGE) ? COLOR_WINDOWFRAME :
+            (context->wi.dwStyle & (WS_DLGFRAME | WS_THICKFRAME)) ? COLOR_3DFACE :
+            COLOR_WINDOWFRAME));
+
+        /* Draw frame */
+        PatBlt(context->hDC, prcCurrent->left, prcCurrent->top, 
+               prcCurrent->right - prcCurrent->left, Height, PATCOPY);
+        PatBlt(context->hDC, prcCurrent->left, prcCurrent->top, 
+               Width, prcCurrent->bottom - prcCurrent->top, PATCOPY);
+        PatBlt(context->hDC, prcCurrent->left, prcCurrent->bottom, 
+               prcCurrent->right - prcCurrent->left, -Height, PATCOPY);
+        PatBlt(context->hDC, prcCurrent->right, prcCurrent->top, 
+              -Width, prcCurrent->bottom - prcCurrent->top, PATCOPY);
+
+        InflateRect(prcCurrent, -Width, -Height);
+    }
+    
+    /* Now the border */
+    if (context->wi.dwStyle & (WS_BORDER))
+    {
         INT Width = GetSystemMetrics(SM_CXBORDER);
         INT Height = GetSystemMetrics(SM_CYBORDER);
 
