The client-side implementation of B_NO_POINTER_HISTORY did only work for SetEventMask(),

but not for SetMouseEventMask(). We now track the value of that mask in a dedicated
member variable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22022 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2007-08-20 23:24:26 +00:00
parent e46b225479
commit b78583734c
3 changed files with 14 additions and 16 deletions

View File

@ -654,10 +654,11 @@ private:
BShelf* fShelf;
uint32 fEventMask;
uint32 fEventOptions;
uint32 fMouseEventOptions;
LayoutData* fLayoutData;
uint32 _reserved[8];
uint32 _reserved[7];
};

View File

@ -318,7 +318,6 @@ ViewState::UpdateFrom(BPrivate::PortLink &link)
struct BView::LayoutData {
LayoutData()
: fMinSize(),
fMaxSize(),
@ -1104,8 +1103,7 @@ BView::Window() const
}
// #pragma mark -
// Hook Functions
// #pragma mark - Hook Functions
void
@ -1267,8 +1265,7 @@ BView::WindowActivated(bool state)
}
// #pragma mark -
// Input Functions
// #pragma mark - Input Functions
void
@ -1619,10 +1616,11 @@ BView::SetMouseEventMask(uint32 mask, uint32 options)
&& fOwner->CurrentMessage() != NULL
&& fOwner->CurrentMessage()->what == B_MOUSE_DOWN) {
check_lock();
fMouseEventOptions = options;
fOwner->fLink->StartMessage(AS_LAYER_SET_MOUSE_EVENT_MASK);
fOwner->fLink->Attach<uint32>(mask);
fOwner->fLink->Attach<uint32>(options);
return B_OK;
}
@ -1630,8 +1628,7 @@ BView::SetMouseEventMask(uint32 mask, uint32 options)
}
// #pragma mark -
// Graphic State Functions
// #pragma mark - Graphic State Functions
void
@ -3361,8 +3358,7 @@ BView::InvertRect(BRect rect)
}
// #pragma mark -
// View Hierarchy Functions
// #pragma mark - View Hierarchy Functions
void
@ -3644,8 +3640,7 @@ BView::ResizeTo(BSize size)
}
// #pragma mark -
// Inherited Methods (from BHandler)
// #pragma mark - Inherited Methods (from BHandler)
status_t
@ -4172,8 +4167,7 @@ BView::_Layout(bool force, BLayoutContext* context)
}
// #pragma mark -
// Private Functions
// #pragma mark - Private Functions
void
@ -4219,6 +4213,7 @@ BView::_InitData(BRect frame, const char *name, uint32 resizingMode, uint32 flag
fEventMask = 0;
fEventOptions = 0;
fMouseEventOptions = 0;
fLayoutData = new LayoutData;
}

View File

@ -1032,6 +1032,7 @@ FrameMoved(origin);
if (BView *view = dynamic_cast<BView *>(target)) {
BPoint where;
msg->FindPoint("be:view_where", &where);
view->fMouseEventOptions = 0;
view->MouseUp(where);
} else
target->MessageReceived(msg);
@ -1042,7 +1043,8 @@ FrameMoved(origin);
case B_MOUSE_MOVED:
{
if (BView *view = dynamic_cast<BView *>(target)) {
if (view->fEventOptions & B_NO_POINTER_HISTORY) {
if (((view->fEventOptions | view->fMouseEventOptions)
& B_NO_POINTER_HISTORY) != 0) {
// filter out older mouse moved messages in the queue
_DequeueAll();
BMessageQueue *queue = MessageQueue();