From fe4224121c4ae6422089e7de75bbed608d50bd5b Mon Sep 17 00:00:00 2001 From: "danm%netscape.com" Date: Tue, 21 Mar 2000 03:38:24 +0000 Subject: [PATCH] specify no min/max buttons for resizeable dialogs. bug 7372. code by roc+moz@cs.cmu.edu git-svn-id: svn://10.0.0.236/trunk@63532 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpfe/appshell/src/nsAppShellService.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/mozilla/xpfe/appshell/src/nsAppShellService.cpp b/mozilla/xpfe/appshell/src/nsAppShellService.cpp index aaf8ba12408..d250cd19d93 100644 --- a/mozilla/xpfe/appshell/src/nsAppShellService.cpp +++ b/mozilla/xpfe/appshell/src/nsAppShellService.cpp @@ -19,6 +19,7 @@ * * Contributor(s): * Pierre Phaneuf + * Robert O'Callahan */ @@ -568,8 +569,17 @@ nsAppShellService::JustCreateTopWindow(nsIXULWindow *aParent, widgetInitData.mBorderStyle = NS_STATIC_CAST(enum nsBorderStyle, widgetInitData.mBorderStyle | eBorderStyle_title); if (aChromeMask & nsIWebBrowserChrome::windowCloseOn) widgetInitData.mBorderStyle = NS_STATIC_CAST(enum nsBorderStyle, widgetInitData.mBorderStyle | eBorderStyle_close); - if (aChromeMask & nsIWebBrowserChrome::windowResizeOn) - widgetInitData.mBorderStyle = NS_STATIC_CAST(enum nsBorderStyle, widgetInitData.mBorderStyle | eBorderStyle_resizeh | eBorderStyle_minimize | eBorderStyle_maximize | eBorderStyle_menu); + if (aChromeMask & nsIWebBrowserChrome::windowResizeOn) { + widgetInitData.mBorderStyle = NS_STATIC_CAST(enum nsBorderStyle, widgetInitData.mBorderStyle | eBorderStyle_resizeh); + /* Associate the resize flag with min/max buttons and system menu. + but not for dialogs. This is logic better associated with the + platform implementation, and partially covered by the + eBorderStyle_default style. But since I know of no platform + that wants min/max buttons on dialogs, it works here, too. + If you have such a platform, this is where the fun starts: */ + if (!(aChromeMask & nsIWebBrowserChrome::openAsDialog)) + widgetInitData.mBorderStyle = NS_STATIC_CAST(enum nsBorderStyle, widgetInitData.mBorderStyle | eBorderStyle_minimize | eBorderStyle_maximize | eBorderStyle_menu); + } } if (aInitialWidth == NS_SIZETOCONTENT ||