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:
parent
e46b225479
commit
b78583734c
@ -654,10 +654,11 @@ private:
|
|||||||
BShelf* fShelf;
|
BShelf* fShelf;
|
||||||
uint32 fEventMask;
|
uint32 fEventMask;
|
||||||
uint32 fEventOptions;
|
uint32 fEventOptions;
|
||||||
|
uint32 fMouseEventOptions;
|
||||||
|
|
||||||
LayoutData* fLayoutData;
|
LayoutData* fLayoutData;
|
||||||
|
|
||||||
uint32 _reserved[8];
|
uint32 _reserved[7];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -318,7 +318,6 @@ ViewState::UpdateFrom(BPrivate::PortLink &link)
|
|||||||
|
|
||||||
|
|
||||||
struct BView::LayoutData {
|
struct BView::LayoutData {
|
||||||
|
|
||||||
LayoutData()
|
LayoutData()
|
||||||
: fMinSize(),
|
: fMinSize(),
|
||||||
fMaxSize(),
|
fMaxSize(),
|
||||||
@ -1104,8 +1103,7 @@ BView::Window() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark -
|
// #pragma mark - Hook Functions
|
||||||
// Hook Functions
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1267,8 +1265,7 @@ BView::WindowActivated(bool state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark -
|
// #pragma mark - Input Functions
|
||||||
// Input Functions
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1619,10 +1616,11 @@ BView::SetMouseEventMask(uint32 mask, uint32 options)
|
|||||||
&& fOwner->CurrentMessage() != NULL
|
&& fOwner->CurrentMessage() != NULL
|
||||||
&& fOwner->CurrentMessage()->what == B_MOUSE_DOWN) {
|
&& fOwner->CurrentMessage()->what == B_MOUSE_DOWN) {
|
||||||
check_lock();
|
check_lock();
|
||||||
|
fMouseEventOptions = options;
|
||||||
|
|
||||||
fOwner->fLink->StartMessage(AS_LAYER_SET_MOUSE_EVENT_MASK);
|
fOwner->fLink->StartMessage(AS_LAYER_SET_MOUSE_EVENT_MASK);
|
||||||
fOwner->fLink->Attach<uint32>(mask);
|
fOwner->fLink->Attach<uint32>(mask);
|
||||||
fOwner->fLink->Attach<uint32>(options);
|
fOwner->fLink->Attach<uint32>(options);
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1630,8 +1628,7 @@ BView::SetMouseEventMask(uint32 mask, uint32 options)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark -
|
// #pragma mark - Graphic State Functions
|
||||||
// Graphic State Functions
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -3361,8 +3358,7 @@ BView::InvertRect(BRect rect)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark -
|
// #pragma mark - View Hierarchy Functions
|
||||||
// View Hierarchy Functions
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -3644,8 +3640,7 @@ BView::ResizeTo(BSize size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark -
|
// #pragma mark - Inherited Methods (from BHandler)
|
||||||
// Inherited Methods (from BHandler)
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
@ -4172,8 +4167,7 @@ BView::_Layout(bool force, BLayoutContext* context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark -
|
// #pragma mark - Private Functions
|
||||||
// Private Functions
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -4219,6 +4213,7 @@ BView::_InitData(BRect frame, const char *name, uint32 resizingMode, uint32 flag
|
|||||||
|
|
||||||
fEventMask = 0;
|
fEventMask = 0;
|
||||||
fEventOptions = 0;
|
fEventOptions = 0;
|
||||||
|
fMouseEventOptions = 0;
|
||||||
|
|
||||||
fLayoutData = new LayoutData;
|
fLayoutData = new LayoutData;
|
||||||
}
|
}
|
||||||
|
@ -1032,6 +1032,7 @@ FrameMoved(origin);
|
|||||||
if (BView *view = dynamic_cast<BView *>(target)) {
|
if (BView *view = dynamic_cast<BView *>(target)) {
|
||||||
BPoint where;
|
BPoint where;
|
||||||
msg->FindPoint("be:view_where", &where);
|
msg->FindPoint("be:view_where", &where);
|
||||||
|
view->fMouseEventOptions = 0;
|
||||||
view->MouseUp(where);
|
view->MouseUp(where);
|
||||||
} else
|
} else
|
||||||
target->MessageReceived(msg);
|
target->MessageReceived(msg);
|
||||||
@ -1042,7 +1043,8 @@ FrameMoved(origin);
|
|||||||
case B_MOUSE_MOVED:
|
case B_MOUSE_MOVED:
|
||||||
{
|
{
|
||||||
if (BView *view = dynamic_cast<BView *>(target)) {
|
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
|
// filter out older mouse moved messages in the queue
|
||||||
_DequeueAll();
|
_DequeueAll();
|
||||||
BMessageQueue *queue = MessageQueue();
|
BMessageQueue *queue = MessageQueue();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user