diff options
author | Borja Lorente | 2016-07-09 13:09:11 +0200 |
---|---|---|
committer | Borja Lorente | 2016-08-14 18:49:30 +0200 |
commit | b35ef40895989d7d64e0f2dd7d0a055082b59569 (patch) | |
tree | d59a61971450d8156c5d20cd431cc254f5150e0c /engines/macventure | |
parent | 8aec5e1cdb1e35a8a3dd03fd58cad493c303f434 (diff) | |
download | scummvm-rg350-b35ef40895989d7d64e0f2dd7d0a055082b59569.tar.gz scummvm-rg350-b35ef40895989d7d64e0f2dd7d0a055082b59569.tar.bz2 scummvm-rg350-b35ef40895989d7d64e0f2dd7d0a055082b59569.zip |
MACVENTURE: Fix temporal window reallocation
Diffstat (limited to 'engines/macventure')
-rw-r--r-- | engines/macventure/macventure.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/engines/macventure/macventure.cpp b/engines/macventure/macventure.cpp index bd3374e894..9994df2c73 100644 --- a/engines/macventure/macventure.cpp +++ b/engines/macventure/macventure.cpp @@ -856,10 +856,14 @@ ObjID MacVentureEngine::getParent(ObjID objID) { } Common::Rect MacVentureEngine::getObjBounds(ObjID objID) { - BorderBounds bounds = _gui->borderBounds(_gui->getWindowData(findParentWindow(objID)).type); // HACK Common::Point pos = getObjPosition(objID); - pos.x += bounds.leftOffset; - pos.y += bounds.topOffset; + + WindowReference win = findParentWindow(objID); + if (win != kNoWindow) { // If it's not in a window YET, we don't really care about the border + BorderBounds bounds = _gui->borderBounds(_gui->getWindowData(win).type); // HACK + pos.x += bounds.leftOffset; + pos.y += bounds.topOffset; + } uint w = _gui->getObjWidth(objID); // This shouldn't go here uint h = _gui->getObjHeight(objID); return Common::Rect(pos.x, pos.y, pos.x + w, pos.y + h); |