All keyboard messages now go to BWindow's preferred handler. Also, mouse wheel messages go to the BView under mouse.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12396 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adi Oanca
2005-04-14 21:42:32 +00:00
parent e86740b699
commit b53cd0ef8f
2 changed files with 23 additions and 22 deletions
+2 -16
View File
@@ -271,22 +271,8 @@ void WinBorder::MouseUp(click_type action)
void WinBorder::MouseWheel(PointerEvent& evt, BPoint& ptWhere)
{
if (fTopLayer->fFullVisible.Contains(ptWhere))
{
Window()->Lock();
// TODO: you can improve performance by doing this search client-side!
Layer *target = LayerAt(evt.where);
if (target && target != fTopLayer)
{
BMessage wheelmsg(B_MOUSE_WHEEL_CHANGED);
wheelmsg.AddInt64("when",evt.when);
wheelmsg.AddFloat("be:wheel_delta_x",evt.wheel_delta_x);
wheelmsg.AddFloat("be:wheel_delta_y",evt.wheel_delta_y);
Window()->SendMessageToClient(&wheelmsg);
}
Window()->Unlock();
}
// what should decorator do with mouse wheel message.
// maybe decorator should have some hook functions for mouse messages.
}
//! Sets the decorator focus to active or inactive colors