diff --git a/widget/public/nsIWidget.h b/widget/public/nsIWidget.h index 1769c9c5d57..39b5d6f304b 100644 --- a/widget/public/nsIWidget.h +++ b/widget/public/nsIWidget.h @@ -95,7 +95,9 @@ enum nsBorderStyle { ///no border eBorderStyle_none, ///dialog box border + title area - eBorderStyle_dialog + eBorderStyle_dialog, + ///window border + eBorderStyle_window }; /** @@ -132,12 +134,14 @@ enum nsCursor { ///(normal cursor, usually rendered as an arrow) struct nsWidgetInitData { nsWidgetInitData() - : clipChildren(PR_FALSE) + : clipChildren(PR_FALSE), + mBorderStyle(eBorderStyle_window) { } // when painting exclude area occupied by child windows PRPackedBool clipChildren; + nsBorderStyle mBorderStyle; }; /** diff --git a/widget/src/windows/nsWindow.cpp b/widget/src/windows/nsWindow.cpp index 4c6bb7d7c95..e759af2f02e 100644 --- a/widget/src/windows/nsWindow.cpp +++ b/widget/src/windows/nsWindow.cpp @@ -483,17 +483,19 @@ nsresult nsWindow::StandardWindowCreate(nsIWidget *aParent, } HWND parent; - if (nsnull != aParent) { - // has a nsIWidget parent + if (nsnull != aParent) { // has a nsIWidget parent parent = ((aParent) ? (HWND)aParent->GetNativeData(NS_NATIVE_WINDOW) : nsnull); aParent->AddChild(this); - } - else { - // has a nsNative parent + } else { // has a nsNative parent parent = (HWND)aNativeParent; } - mWnd = ::CreateWindowEx(WindowExStyle(), + DWORD extendedStyle = WindowExStyle(); + if (nsnull != aInitData && aInitData->mBorderStyle == eBorderStyle_dialog) { + extendedStyle = 0; + } + + mWnd = ::CreateWindowEx(extendedStyle, WindowClass(), "", style,