mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Fix bug # 132493: Mac OS X sheets issue. r=pinkerton sr=ben a=asa
This commit is contained in:
parent
0037682093
commit
66cac563c2
@ -828,7 +828,16 @@ NS_IMETHODIMP nsMacWindow::Show(PRBool bState)
|
||||
if ( mIsSheet && parentWindowRef ) {
|
||||
WindowPtr top = GetWindowTop(parentWindowRef);
|
||||
if (piParentWidget)
|
||||
{
|
||||
piParentWidget->SetIgnoreDeactivate(PR_TRUE);
|
||||
PRBool sheetFlag = PR_FALSE;
|
||||
if (parentWindowRef &&
|
||||
NS_SUCCEEDED(piParentWidget->GetIsSheet(&sheetFlag)) && (sheetFlag))
|
||||
{
|
||||
::GetSheetWindowParent(parentWindowRef, &top);
|
||||
::HideSheetWindow(parentWindowRef);
|
||||
}
|
||||
}
|
||||
::ShowSheetWindow(mWindowPtr, top);
|
||||
UpdateWindowMenubar(parentWindowRef, PR_FALSE);
|
||||
gEventDispatchHandler.DispatchGuiEvent(this, NS_GOTFOCUS);
|
||||
@ -872,7 +881,14 @@ NS_IMETHODIMP nsMacWindow::Show(PRBool bState)
|
||||
// we need to ensure that the top app window is active
|
||||
WindowPtr top = GetWindowTop(parentWindowRef);
|
||||
|
||||
if ( mAcceptsActivation ) {
|
||||
PRBool sheetFlag = PR_FALSE;
|
||||
if (parentWindowRef &&
|
||||
NS_SUCCEEDED(piParentWidget->GetIsSheet(&sheetFlag)) && (sheetFlag))
|
||||
{
|
||||
::GetSheetWindowParent(parentWindowRef, &top);
|
||||
::ShowSheetWindow(parentWindowRef, top);
|
||||
}
|
||||
else if ( mAcceptsActivation ) {
|
||||
::ShowWindow(top);
|
||||
}
|
||||
else {
|
||||
@ -1371,6 +1387,13 @@ nsMacWindow::SetIgnoreDeactivate(PRBool ignoreDeactivate)
|
||||
return(NS_OK);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMacWindow::GetIsSheet(PRBool *_retval)
|
||||
{
|
||||
*_retval = mIsSheet;
|
||||
return(NS_OK);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
|
@ -46,5 +46,8 @@ interface nsPIWidgetMac : nsISupports
|
||||
// True if window should ignore the next deactivate event it receives
|
||||
attribute boolean ignoreDeactivate;
|
||||
|
||||
// True if window is a sheet
|
||||
readonly attribute boolean isSheet;
|
||||
|
||||
}; // nsPIWidgetMac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user