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:
parent
68b028320a
commit
84c9d73d7d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user