Bug 752294 - Handle failure to enter fullscreen mode because window is invisible. r=bgirard

This commit is contained in:
Steven Michaud 2012-06-20 10:52:13 -05:00
Родитель 90b16fd322
Коммит e0daa8c6e9
1 изменённых файлов: 10 добавлений и 0 удалений

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

@ -1213,6 +1213,16 @@ NS_METHOD nsCocoaWindow::MakeFullScreen(bool aFullScreen)
if (mFullScreen == aFullScreen) {
return NS_OK;
}
// If we're using native fullscreen mode and our native window is invisible,
// our attempt to go into fullscreen mode will fail with an assertion in
// system code, without [WindowDelegate windowDidFailToEnterFullScreen:]
// ever getting called. To pre-empt this we bail here. See bug 752294.
if (mUsesNativeFullScreen && aFullScreen && ![mWindow isVisible]) {
EnteredFullScreen(false);
return NS_OK;
}
mInFullScreenTransition = true;
if (mUsesNativeFullScreen) {