In the B_MOUSE_MOVED message, "where" is supposed to be in window coordinates

while "be:view_where" is in view coordinates. We made the mistake of having
them both be in view coordinates. This caused a problem for example in Vision.
(#2460)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26491 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2008-07-18 22:34:38 +00:00
parent 68b028320a
commit 84c9d73d7d
1 changed files with 3 additions and 4 deletions

View File

@ -3113,12 +3113,14 @@ BWindow::_SanitizeMessage(BMessage* message, BHandler* target, bool usePreferred
if (message->FindPoint("screen_where", &where) != B_OK)
break;
// add local window coordinates
message->AddPoint("where", ConvertFromScreen(where));
BView* view = dynamic_cast<BView*>(target);
if (view != NULL) {
// add local view coordinates
message->AddPoint("be:view_where",
view->ConvertFromScreen(where));
message->AddPoint("where", view->ConvertFromScreen(where));
if (message->what == B_MOUSE_MOVED) {
// is there a token of the view that is currently under the mouse?
@ -3148,9 +3150,6 @@ BWindow::_SanitizeMessage(BMessage* message, BHandler* target, bool usePreferred
if (usePreferred || viewUnderMouse == NULL)
fLastMouseMovedView = viewUnderMouse;
}
} else {
// add local window coordinates
message->AddPoint("where", ConvertFromScreen(where));
}
break;
}