Move B_MOUSE_IDLE generation to app_server.

* BWindow used to generate the B_MOUSE_IDLE events by sending a
  delayed message with a one-shot BMessageRunner to itself.
  Every creation and deletion of BMessageRunners causes synchronous
  messaging between the application under the mouse cursor and the
  registrar. This creates large amounts of calls to set_port_owner()
  in the kernel whenever moving the mouse.

* Now, B_MOUSE_IDLE is sent by the cursor loop inside the app_server
  instead. When the mouse wasn't moved for the tooltip delay time,
  it inserts a B_MOUSE_IDLE message into the event stream.

* The tooltip delay thus becomes a system-wide constant and is not
  configurable per-application anymore (no code currently in the
  Haiku repo makes use of that anyhow).
This commit is contained in:
Julian Harnath
2013-10-26 16:11:45 +02:00
parent 7f64b301b1
commit 057c8708f2
5 changed files with 42 additions and 28 deletions
+1 -1
View File
@@ -369,7 +369,7 @@ private:
BView* fTopView;
BView* fFocus;
BView* fLastMouseMovedView;
BMessageRunner* fIdleMouseRunner;
uint32 _unused1;
BMenuBar* fKeyMenuBar;
BButton* fDefaultButton;
BList fShortcuts;