Bug 634586 - Hide the main window while transitioning to full screen, improves full screen transition experience. r=bz

This commit is contained in:
Jim Mathies 2011-03-28 07:36:37 -05:00
Родитель 23f60d49d7
Коммит 54567cecf6
1 изменённых файлов: 12 добавлений и 1 удалений

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

@ -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;
}