Backed out changeset 05dde680ade2 as per bug 575870 comment 71

This commit is contained in:
Dão Gottwald 2010-08-15 14:29:11 +02:00
parent 65a26615c5
commit f37452cd9f
2 changed files with 13 additions and 2 deletions

View File

@ -378,6 +378,7 @@ nsWindow::nsWindow() : nsBaseWidget()
mDisplayPanFeedback = PR_FALSE; mDisplayPanFeedback = PR_FALSE;
mTouchWindow = PR_FALSE; mTouchWindow = PR_FALSE;
mCustomNonClient = PR_FALSE; mCustomNonClient = PR_FALSE;
mCompositorFlag = PR_FALSE;
mHideChrome = PR_FALSE; mHideChrome = PR_FALSE;
mWindowType = eWindowType_child; mWindowType = eWindowType_child;
mBorderStyle = eBorderStyle_default; mBorderStyle = eBorderStyle_default;
@ -1988,6 +1989,13 @@ nsWindow::UpdateNonClientMargins(PRInt32 aSizeMode, PRBool aReflowWindow)
if (!mCustomNonClient) if (!mCustomNonClient)
return PR_FALSE; 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.top = mNonClientOffset.bottom =
mNonClientOffset.left = mNonClientOffset.right = 0; mNonClientOffset.left = mNonClientOffset.right = 0;
@ -4564,6 +4572,7 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
// Glass hit testing w/custom transparent margins // Glass hit testing w/custom transparent margins
LRESULT dwmHitResult; LRESULT dwmHitResult;
if (mCustomNonClient && if (mCustomNonClient &&
mCompositorFlag &&
nsUXThemeData::CheckForCompositor() && nsUXThemeData::CheckForCompositor() &&
nsUXThemeData::dwmDwmDefWindowProcPtr(mWnd, msg, wParam, lParam, &dwmHitResult)) { nsUXThemeData::dwmDwmDefWindowProcPtr(mWnd, msg, wParam, lParam, &dwmHitResult)) {
*aRetValue = dwmHitResult; *aRetValue = dwmHitResult;
@ -4704,7 +4713,7 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
// copies the valid information to the specified area within the new // copies the valid information to the specified area within the new
// client area. If the wParam parameter is FALSE, the application should // client area. If the wParam parameter is FALSE, the application should
// return zero. // return zero.
if (mCustomNonClient) { if (mCustomNonClient && mCompositorFlag) {
if (!wParam) { if (!wParam) {
result = PR_TRUE; result = PR_TRUE;
*aRetValue = 0; *aRetValue = 0;
@ -4744,7 +4753,7 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
* composited desktop. * composited desktop.
*/ */
if (!mCustomNonClient) if (!mCustomNonClient || !mCompositorFlag)
break; break;
*aRetValue = *aRetValue =

View File

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