Helped BWindow for calling the apropriate BView hook methods on some mouse and keyboard events
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11242 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
79c8040e93
commit
998521f78d
@ -1288,10 +1288,8 @@ void RootLayer::KeyboardEventHandler(int32 code, BPortLink& msg)
|
||||
}
|
||||
keymsg.AddString("bytes",string);
|
||||
// keymsg.AddInt32("raw_char",raw_char);
|
||||
|
||||
printf("RootLayer keyboard message:\n");
|
||||
keymsg.PrintToStream();
|
||||
printf("\n");
|
||||
keymsg.AddInt32("haiku:token", target->fViewToken);
|
||||
|
||||
win->SendMessageToClient(&keymsg);
|
||||
}
|
||||
}
|
||||
@ -1386,7 +1384,8 @@ printf("\n");
|
||||
}
|
||||
keymsg.AddString("bytes",string);
|
||||
keymsg.AddInt32("raw_char",raw_char);
|
||||
|
||||
keymsg.AddInt32("haiku:token", target->fViewToken);
|
||||
|
||||
win->SendMessageToClient(&keymsg);
|
||||
}
|
||||
}
|
||||
|
@ -220,7 +220,8 @@ void WinBorder::MouseDown(PointerEvent& evt, bool sendMessage)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (sendMessage && target && target != fTopLayer){
|
||||
else if (sendMessage && target && target != fTopLayer)
|
||||
{
|
||||
BMessage msg;
|
||||
msg.what = B_MOUSE_DOWN;
|
||||
msg.AddInt64("when", evt.when);
|
||||
@ -360,13 +361,15 @@ void WinBorder::MouseUp(PointerEvent& evt)
|
||||
return;
|
||||
}
|
||||
|
||||
if (fTopLayer->fFullVisible.Contains(evt.where))
|
||||
Layer *target = LayerAt(evt.where);
|
||||
if (target && target != fTopLayer)
|
||||
{
|
||||
BMessage upmsg(B_MOUSE_UP);
|
||||
upmsg.AddInt64("when",evt.when);
|
||||
upmsg.AddPoint("where",evt.where);
|
||||
upmsg.AddInt32("modifiers",evt.modifiers);
|
||||
|
||||
upmsg.AddInt32("haiku:token", target? target->fViewToken: B_NULL_TOKEN);
|
||||
|
||||
Window()->SendMessageToClient(&upmsg);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user