* _DetermineTarget() will now return fLastMouseMovedView in case there

was no valid "_view_token" in the mouse event.
* _SanitizeMessage() will now only add the "be:transit" field for
  B_MOUSE_MOVED messages. It will also now only update fLastMouseMovedView
  for B_MOUSE_MOVED messages, and not for all mouse messages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15124 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-11-24 16:25:41 +00:00
parent 5afc064831
commit 5604d3c9ce
+7
View File
@@ -2454,6 +2454,11 @@ BWindow::_DetermineTarget(BMessage *message, BHandler *target)
return view; return view;
} }
} }
// if there is no valid token in the message, we try our
// luck with the last target, if available
if (fLastMouseMovedView != NULL)
return fLastMouseMovedView;
break; break;
case B_PULSE: case B_PULSE:
@@ -2582,6 +2587,7 @@ BWindow::_SanitizeMessage(BMessage* message, BHandler* target, bool usePreferred
// add local view coordinates // add local view coordinates
message->AddPoint("be:view_where", view->ConvertFromScreen(where)); message->AddPoint("be:view_where", view->ConvertFromScreen(where));
if (message->what == B_MOUSE_MOVED) {
// is there a token of the view that is currently under the mouse? // is there a token of the view that is currently under the mouse?
BView* viewUnderMouse = NULL; BView* viewUnderMouse = NULL;
int32 token; int32 token;
@@ -2615,6 +2621,7 @@ BWindow::_SanitizeMessage(BMessage* message, BHandler* target, bool usePreferred
if (usePreferred || viewUnderMouse == NULL) if (usePreferred || viewUnderMouse == NULL)
fLastMouseMovedView = viewUnderMouse; fLastMouseMovedView = viewUnderMouse;
} }
}
break; break;
} }
} }