aboutsummaryrefslogtreecommitdiff
path: root/engines/macventure/gui.cpp
diff options
context:
space:
mode:
authorBorja Lorente2016-07-10 23:03:26 +0200
committerBorja Lorente2016-08-14 18:53:49 +0200
commita5a094b6bdf1dd61f270e60068c42d9f62b8c447 (patch)
tree44d1616a47f612c42ce3d38ba909008c9bf2a473 /engines/macventure/gui.cpp
parentb6acfe868ce4b614bfdc9d510e10e35923a7fed6 (diff)
downloadscummvm-rg350-a5a094b6bdf1dd61f270e60068c42d9f62b8c447.tar.gz
scummvm-rg350-a5a094b6bdf1dd61f270e60068c42d9f62b8c447.tar.bz2
scummvm-rg350-a5a094b6bdf1dd61f270e60068c42d9f62b8c447.zip
MACVENTURE: Begin fixing second inventory problem
Diffstat (limited to 'engines/macventure/gui.cpp')
-rw-r--r--engines/macventure/gui.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp
index 880ec286d0..1f07e7c7c4 100644
--- a/engines/macventure/gui.cpp
+++ b/engines/macventure/gui.cpp
@@ -830,7 +830,8 @@ WindowReference Gui::findWindowAtPoint(Common::Point point) {
Common::List<WindowData>::iterator it;
for (it = _windowData->begin(); it != _windowData->end(); it++) {
if (it->bounds.contains(point) && it->refcon != kDiplomaWindow) { //HACK, diploma should be cosnidered
- return it->refcon;
+ if (findWindow(it->refcon)->isActive())
+ return it->refcon;
}
}
return kNoWindow;
@@ -957,6 +958,7 @@ void Gui::selectDraggable(ObjID child, WindowReference origin, Common::Point sta
void Gui::handleDragRelease(Common::Point pos, bool shiftPressed, bool isDoubleClick) {
WindowReference destinationWindow = findWindowAtPoint(pos);
+ if (destinationWindow == kNoWindow) return;
if (_draggedObj.id != 0) {
if (_draggedObj.hasMoved) {
ObjID destObject = getWindowData(destinationWindow).objRef;
@@ -1260,6 +1262,7 @@ bool Gui::processInventoryEvents(WindowClick click, Common::Event & event) {
// Find the appropriate window
WindowReference ref = findWindowAtPoint(event.mouse);
+ if (ref == kNoWindow) return false;
Graphics::MacWindow *win = findWindow(ref);
WindowData &data = findWindowData((WindowReference) ref);
ObjID child;