зеркало из https://github.com/mozilla/pjs.git
Bug 634586 - Hide the main window while transitioning to full screen, improves full screen transition experience. r=bz
This commit is contained in:
Родитель
23f60d49d7
Коммит
54567cecf6
|
@ -4408,8 +4408,19 @@ nsGlobalWindow::SetFullScreen(PRBool aFullScreen)
|
|||
mFullScreen = aFullScreen;
|
||||
|
||||
nsCOMPtr<nsIWidget> widget = GetMainWidget();
|
||||
if (widget)
|
||||
if (widget) {
|
||||
PRBool visible;
|
||||
widget->IsVisible(visible);
|
||||
if (visible && aFullScreen)
|
||||
widget->Show(PR_FALSE);
|
||||
widget->MakeFullScreen(aFullScreen);
|
||||
if (visible && aFullScreen) {
|
||||
widget->Show(PR_TRUE);
|
||||
nsIFocusManager* fm = nsFocusManager::GetFocusManager();
|
||||
if (fm)
|
||||
fm->SetActiveWindow(this);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче