Added temporary hack so that windows don't get mouse messages if the cursor
is not over them - this should be better integrated with the rest of the code (later, when we don't rely on RootLayer for everything anymore). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15151 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
fa2c53ed52
commit
39b345c7b6
@ -369,6 +369,7 @@ EventDispatcher::SetFocus(const BMessenger* messenger)
|
||||
} else
|
||||
fFocus = NULL;
|
||||
|
||||
fFocusGotExitTransit = true;
|
||||
fTransit = true;
|
||||
}
|
||||
|
||||
@ -765,9 +766,24 @@ EventDispatcher::_EventLoop()
|
||||
pointerEvent = true;
|
||||
|
||||
if (fFocus != NULL) {
|
||||
int32 viewToken;
|
||||
|
||||
addedTokens |= _AddTokens(event, fFocus, B_POINTER_EVENTS);
|
||||
if (addedTokens)
|
||||
_SetFeedFocus(event);
|
||||
else if (fFocusGotExitTransit) {
|
||||
// TODO: this is a temporary hack to not continue to
|
||||
// send mouse messages to the client when the mouse
|
||||
// pointer is not over it
|
||||
if (event->FindInt32("_view_token", &viewToken) != B_OK)
|
||||
break;
|
||||
|
||||
fFocusGotExitTransit = false;
|
||||
} else if (event->what == B_MOUSE_MOVED) {
|
||||
if (event->FindInt32("_view_token", &viewToken) != B_OK)
|
||||
fFocusGotExitTransit = true;
|
||||
}
|
||||
|
||||
_SendMessage(fFocus->Messenger(), event, event->what == B_MOUSE_MOVED
|
||||
? kMouseMovedImportance : kStandardImportance);
|
||||
}
|
||||
|
@ -82,6 +82,7 @@ class EventDispatcher : public BLocker {
|
||||
Target* fFocus;
|
||||
Target* fLastFocus;
|
||||
bool fTransit;
|
||||
bool fFocusGotExitTransit;
|
||||
bool fSuspendFocus;
|
||||
|
||||
BMessageFilter* fMouseFilter;
|
||||
|
Loading…
Reference in New Issue
Block a user