zooey + axeld + stippi:

Fixed a problem with dispatching B_MOUSE_MOVED messages to views which need
the transit event:
* If the app_server decided to send a B_MOUSE_MOVED to the previous mouse
  containing window, it forgot to add the _feed_focus flag, which was a problem
  if the message actually happened to contain tokens (views that registered
  for events.) On the client side, only those views would receive the message,
  while the regular last mouse moved view would not be notified at all.
* On the client side, never change fLastMouseMovedView if the message is not
  targeted at the preferred handler. In the above situation, any "registered
  for events views" would receive the message first, but viewUnderMouse would
  be NULL and then when the regular last mouse moved view received it, it
  resulted in the wrong transit (B_OUTSIDE_VIEW instead of B_EXITED_VIEW).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28059 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2008-10-13 23:16:30 +00:00
parent bfaa132f3f
commit 350b87c7d2
2 changed files with 3 additions and 1 deletions

View File

@ -3143,7 +3143,7 @@ BWindow::_SanitizeMessage(BMessage* message, BHandler* target, bool usePreferred
uint32 transit = _TransitForMouseMoved(view, viewUnderMouse);;
message->AddInt32("be:transit", transit);
if (usePreferred || viewUnderMouse == NULL)
if (usePreferred)
fLastMouseMovedView = viewUnderMouse;
}
}

View File

@ -814,6 +814,8 @@ EventDispatcher::_EventLoop()
// that the mouse has exited its views
addedTokens = _AddTokens(event, fPreviousMouseTarget,
B_POINTER_EVENTS);
if (addedTokens)
_SetFeedFocus(event);
_SendMessage(fPreviousMouseTarget->Messenger(), event,
kMouseTransitImportance);