Next big step in the event handling:
* RootLayer's mouse event processing is now at its minimum - the EventDispatcher handles them now. As a result, a window will now get only one message per event. * RootLayer adds "_view_token" to mouse moved messages that specify the view currently under the cursor. * There is now a mouse event layer in RootLayer that gets preferred when it's set - this is now used for the window moving instead of the previous mechanism. * changed the previous DistributeMessage() to an UnpackMessage() method following Adi's suggestion. * caveat: some things might be functionally broken in RootLayer now because of removing the mouse notification stuff. * "be:transit" handling is now done completely client side by BWindow::_SanitizeMessage(() (similar to what the input_server does). This should also make the mechanism pretty robust, since every B_MOUSE_MOVED message can now trigger the view transit (in case a message is lost). B_WINDOW_ACTIVATED messages should be generated client side as well. * renamed AS_LAYER_GET_MOUSE_COORDS to AS_GET_MOUSE as it's not a layer specific command, and also gets the mouse buttons. * B_MOUSE_* messages from the up server now contain only a "screen_where" field; "where" (in window's coordinates) and "be:view_where" are added in BMessage::_SanitizeMessage(). * messages that don't have a valid target in the looper are now dropped instead of being sent to the looper - this should be done in BLooper as well, though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15087 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -226,6 +226,7 @@ public:
|
||||
|
||||
private:
|
||||
typedef BLooper inherited;
|
||||
struct unpack_cookie;
|
||||
class Shortcut;
|
||||
|
||||
friend class BApplication;
|
||||
@@ -267,7 +268,10 @@ private:
|
||||
void AddShortcut(uint32 key, uint32 modifiers,
|
||||
BMenuItem* item);
|
||||
BHandler* _DetermineTarget(BMessage* message, BHandler* target);
|
||||
bool _DistributeMessage(BMessage* message, BHandler* target);
|
||||
bool _UnpackMessage(unpack_cookie& state, BMessage** _message,
|
||||
BHandler** _target, bool* _usePreferred);
|
||||
void _SanitizeMessage(BMessage* message, BHandler* target,
|
||||
bool usePreferred);
|
||||
|
||||
bool InUpdate();
|
||||
void _DequeueAll();
|
||||
|
||||
Reference in New Issue
Block a user