aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-04-18 19:42:48 +0200
committerEugene Sandulenko2016-04-19 09:35:50 +0200
commit73733594c1536194a314597c596cd123294bb9fc (patch)
tree785a5e033ca6a16fb5c67ca1679ec9270ca64ad1
parente6c5c96b07545bb37c2dc7b3359c35e1e35d0b4e (diff)
downloadscummvm-rg350-73733594c1536194a314597c596cd123294bb9fc.tar.gz
scummvm-rg350-73733594c1536194a314597c596cd123294bb9fc.tar.bz2
scummvm-rg350-73733594c1536194a314597c596cd123294bb9fc.zip
WAGE: Fixed window switching
-rw-r--r--engines/wage/macwindowmanager.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/wage/macwindowmanager.cpp b/engines/wage/macwindowmanager.cpp
index 78ca6aded4..61beca8d4d 100644
--- a/engines/wage/macwindowmanager.cpp
+++ b/engines/wage/macwindowmanager.cpp
@@ -74,11 +74,11 @@ int MacWindowManager::add(bool scrollable) {
_windows.push_back(w);
_windowStack.push_back(w);
- _activeWindow = _lastId;
+ setActive(_lastId);
_lastId++;
- return _activeWindow;
+ return _lastId - 1;
}
void MacWindowManager::setActive(int id) {
@@ -88,6 +88,8 @@ void MacWindowManager::setActive(int id) {
if (_activeWindow != -1)
_windows[_activeWindow]->setActive(false);
+ _activeWindow = id;
+
_windows[id]->setActive(true);
_windowStack.remove(_windows[id]);