diff --git a/headers/os/interface/View.h b/headers/os/interface/View.h index 6b55feb653..39becf87df 100644 --- a/headers/os/interface/View.h +++ b/headers/os/interface/View.h @@ -654,10 +654,11 @@ private: BShelf* fShelf; uint32 fEventMask; uint32 fEventOptions; + uint32 fMouseEventOptions; LayoutData* fLayoutData; - uint32 _reserved[8]; + uint32 _reserved[7]; }; diff --git a/src/kits/interface/View.cpp b/src/kits/interface/View.cpp index 13c9294d8a..1d11c60e99 100644 --- a/src/kits/interface/View.cpp +++ b/src/kits/interface/View.cpp @@ -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(mask); fOwner->fLink->Attach(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; } diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index ed50817fc2..a89906aceb 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -1032,6 +1032,7 @@ FrameMoved(origin); if (BView *view = dynamic_cast(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(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();