Someone (like the screen_blanker) could call
BDirectWindow::SetFullScreen() before the window is shown. The app_server didn't like this, since in that case, Window::Screen() is NULL. I added a check to ServerWindow::_ResizeToFullScreen() to handle that case. +alphabranch git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32774 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -3561,7 +3561,13 @@ ServerWindow::_MessageNeedsAllWindowsLocked(uint32 code) const
|
|||||||
void
|
void
|
||||||
ServerWindow::_ResizeToFullScreen()
|
ServerWindow::_ResizeToFullScreen()
|
||||||
{
|
{
|
||||||
BRect screenFrame = fWindow->Screen()->Frame();
|
const Screen *screen = fWindow->Screen();
|
||||||
|
if (screen == NULL) {
|
||||||
|
return;
|
||||||
|
// the window isn't yet attached to a screen
|
||||||
|
}
|
||||||
|
|
||||||
|
BRect screenFrame = screen->Frame();
|
||||||
|
|
||||||
fDesktop->MoveWindowBy(fWindow,
|
fDesktop->MoveWindowBy(fWindow,
|
||||||
screenFrame.left - fWindow->Frame().left,
|
screenFrame.left - fWindow->Frame().left,
|
||||||
@@ -3605,6 +3611,7 @@ ServerWindow::_DirectWindowSetFullScreen(bool enable)
|
|||||||
fDesktop->HWInterface()->SetCursorVisible(false);
|
fDesktop->HWInterface()->SetCursorVisible(false);
|
||||||
|
|
||||||
fDirectWindowInfo->EnableFullScreen(fWindow->Frame(), fWindow->Feel());
|
fDirectWindowInfo->EnableFullScreen(fWindow->Frame(), fWindow->Feel());
|
||||||
|
|
||||||
_ResizeToFullScreen();
|
_ResizeToFullScreen();
|
||||||
} else {
|
} else {
|
||||||
const BRect& originalFrame = fDirectWindowInfo->OriginalFrame();
|
const BRect& originalFrame = fDirectWindowInfo->OriginalFrame();
|
||||||
|
|||||||
Reference in New Issue
Block a user