* Pass the mouse wheel message to our parent (ie. the next handler) if we don't
have any scrollers. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31580 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -4167,18 +4167,22 @@ BView::MessageReceived(BMessage* msg)
|
||||
|
||||
case B_MOUSE_WHEEL_CHANGED:
|
||||
{
|
||||
float deltaX = 0.0f, deltaY = 0.0f;
|
||||
|
||||
BScrollBar* horizontal = ScrollBar(B_HORIZONTAL);
|
||||
BScrollBar* vertical = ScrollBar(B_VERTICAL);
|
||||
if (horizontal == NULL && vertical == NULL) {
|
||||
// Pass the message to the next handler
|
||||
BHandler::MessageReceived(msg);
|
||||
break;
|
||||
}
|
||||
|
||||
float deltaX = 0.0f, deltaY = 0.0f;
|
||||
if (horizontal != NULL)
|
||||
msg->FindFloat("be:wheel_delta_x", &deltaX);
|
||||
|
||||
BScrollBar* vertical = ScrollBar(B_VERTICAL);
|
||||
if (vertical != NULL)
|
||||
msg->FindFloat("be:wheel_delta_y", &deltaY);
|
||||
|
||||
if (deltaX == 0.0f && deltaY == 0.0f)
|
||||
return;
|
||||
break;
|
||||
|
||||
float smallStep, largeStep;
|
||||
if (horizontal != NULL) {
|
||||
@@ -4210,7 +4214,8 @@ BView::MessageReceived(BMessage* msg)
|
||||
}
|
||||
|
||||
default:
|
||||
return BHandler::MessageReceived(msg);
|
||||
BHandler::MessageReceived(msg);
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user