[haiku-commits] Re: BRANCH orangejua-github.ticket8007 [8182872] src/servers/app src/kits/interface src/system/kernel headers/os/interface

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 06 Oct 2013 23:36:27 +0200

On 10/06/2013 11:00 PM, orangejua-github.ticket8007 wrote:
+void
+EventDispatcher::_CursorIdleLoop()
+{
+       const bigtime_t toolTipDelay = BToolTipManager::Manager()->ShowDelay();
+       
+       for (;;) {
+               const bigtime_t now = system_time();
+               
+               if (fLastNotifyTime < fLastMouseMove
+                   && now - fLastMouseMove >= toolTipDelay) {

Those look like spaces; we always use tabs for indenting.
Anyway, is it really necessary to start a second thread for this? Can't we just let the cursor looper time out instead? That at least sounds cheaper than this (polling isn't so great).

Bye,
   Axel.


Other related posts: