Backed out changeset 05dde680ade2 as per bug 575870 comment 71 (merge)

This commit is contained in:
Dão Gottwald 2010-08-15 14:30:16 +02:00
Родитель c2639a6316 b827b6f2eb
Коммит 7a5f292024
2 изменённых файлов: 13 добавлений и 2 удалений

Просмотреть файл

@ -379,6 +379,7 @@ nsWindow::nsWindow() : nsBaseWidget()
mDisplayPanFeedback = PR_FALSE;
mTouchWindow = PR_FALSE;
mCustomNonClient = PR_FALSE;
mCompositorFlag = PR_FALSE;
mHideChrome = PR_FALSE;
mWindowType = eWindowType_child;
mBorderStyle = eBorderStyle_default;
@ -1995,6 +1996,13 @@ nsWindow::UpdateNonClientMargins(PRInt32 aSizeMode, PRBool aReflowWindow)
if (!mCustomNonClient)
return PR_FALSE;
// XXX Temp disable margins until frame rendering is supported
mCompositorFlag = PR_TRUE;
if(!nsUXThemeData::CheckForCompositor()) {
mCompositorFlag = PR_FALSE;
return PR_FALSE;
}
mNonClientOffset.top = mNonClientOffset.bottom =
mNonClientOffset.left = mNonClientOffset.right = 0;
@ -4312,6 +4320,7 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
// Glass hit testing w/custom transparent margins
LRESULT dwmHitResult;
if (mCustomNonClient &&
mCompositorFlag &&
nsUXThemeData::CheckForCompositor() &&
nsUXThemeData::dwmDwmDefWindowProcPtr(mWnd, msg, wParam, lParam, &dwmHitResult)) {
*aRetValue = dwmHitResult;
@ -4452,7 +4461,7 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
// copies the valid information to the specified area within the new
// client area. If the wParam parameter is FALSE, the application should
// return zero.
if (mCustomNonClient) {
if (mCustomNonClient && mCompositorFlag) {
if (!wParam) {
result = PR_TRUE;
*aRetValue = 0;
@ -4492,7 +4501,7 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
* composited desktop.
*/
if (!mCustomNonClient)
if (!mCustomNonClient || !mCompositorFlag)
break;
*aRetValue =

Просмотреть файл

@ -504,6 +504,8 @@ protected:
nsIntMargin mNonClientMargins;
// Indicates custom frames are enabled
PRPackedBool mCustomNonClient;
// Disable non client margins on non-comsitor desktops
PRPackedBool mCompositorFlag;
// Cached copy of L&F's resize border
PRInt32 mHorResizeMargin;
PRInt32 mVertResizeMargin;