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:
@@ -3113,12 +3113,14 @@ BWindow::_SanitizeMessage(BMessage* message, BHandler* target, bool usePreferred
|
|||||||
if (message->FindPoint("screen_where", &where) != B_OK)
|
if (message->FindPoint("screen_where", &where) != B_OK)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// add local window coordinates
|
||||||
|
message->AddPoint("where", ConvertFromScreen(where));
|
||||||
|
|
||||||
BView* view = dynamic_cast<BView*>(target);
|
BView* view = dynamic_cast<BView*>(target);
|
||||||
if (view != NULL) {
|
if (view != NULL) {
|
||||||
// add local view coordinates
|
// add local view coordinates
|
||||||
message->AddPoint("be:view_where",
|
message->AddPoint("be:view_where",
|
||||||
view->ConvertFromScreen(where));
|
view->ConvertFromScreen(where));
|
||||||
message->AddPoint("where", view->ConvertFromScreen(where));
|
|
||||||
|
|
||||||
if (message->what == B_MOUSE_MOVED) {
|
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?
|
||||||
@@ -3148,9 +3150,6 @@ BWindow::_SanitizeMessage(BMessage* message, BHandler* target, bool usePreferred
|
|||||||
if (usePreferred || viewUnderMouse == NULL)
|
if (usePreferred || viewUnderMouse == NULL)
|
||||||
fLastMouseMovedView = viewUnderMouse;
|
fLastMouseMovedView = viewUnderMouse;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// add local window coordinates
|
|
||||||
message->AddPoint("where", ConvertFromScreen(where));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user