No longer checks if there is already a "be:transit" item in the message;

there should never be one (at least not a valid one).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15125 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-11-24 16:39:19 +00:00
parent 5604d3c9ce
commit 860c144735
+14 -16
View File
@@ -2600,24 +2600,22 @@ BWindow::_SanitizeMessage(BMessage* message, BHandler* target, bool usePreferred
// add transit information
int32 transit;
if (message->FindInt32("be:transit", &transit) != B_OK) {
if (viewUnderMouse == view) {
// the mouse is over the target view
if (fLastMouseMovedView != view)
transit = B_ENTERED_VIEW;
else
transit = B_INSIDE_VIEW;
} else {
// the mouse is not over the target view
if (view == fLastMouseMovedView)
transit = B_EXITED_VIEW;
else
transit = B_OUTSIDE_VIEW;
}
message->AddInt32("be:transit", transit);
if (viewUnderMouse == view) {
// the mouse is over the target view
if (fLastMouseMovedView != view)
transit = B_ENTERED_VIEW;
else
transit = B_INSIDE_VIEW;
} else {
// the mouse is not over the target view
if (view == fLastMouseMovedView)
transit = B_EXITED_VIEW;
else
transit = B_OUTSIDE_VIEW;
}
message->AddInt32("be:transit", transit);
if (usePreferred || viewUnderMouse == NULL)
fLastMouseMovedView = viewUnderMouse;
}