method fitOnScreen

bool fitOnScreen();

Argumente

Zurückgegebener Wert

This method fits the window on the main desktop. The method returns true if the window had to be moved from its current position.
function onSample()
{
    var rootBox = scene.rootBox;
    if (rootBox)
    {
        var didMove = rootBox.fitOnScreen();
        if (didMove == true)
            shell.print("Window moved.");
        else
            shell.print("Window did not move.");
    }
}