[haiku-development] Re: About multi- B_MOUSE_MOVED message (Revision 26341)

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 11 Jul 2008 11:28:39 +0200

Star's seed wrote:
>    I think that consolidating B_MOUSE_MOVED message in the window code  
> (ignoring old messages if a more recent exists) is a bad idea because 
> it's complex and consumes a lot of CPUCycle. ( PostMessage,GetMessage 
> DispatchMessage system_time ! _DequeueAll ! )
> 
>    I think it would be better to post a B_MOUSE_MOVED message only if   
> the last mouse message in the queue is not a B_MOUSE_MOVED message. if it 
> is, we should modify the existing message by aggregating vertical and 
> horizontal shift.
> this way gives good response times (like in other OSes) and should 
> prevent bugs when the message queue contains something like: 
> B_MOUSE_DOWNB_MOUSE_MOVED
> B_MOUSE_MOVED
> B_MOUSE_MOVEDB_MOUSE_MOVED
> B_MOUSE_UP
> B_MOUSE_MOVED
> B_MOUSE_MOVED
> B_MOUSE_MOVED

I am surprised how much beating I get for a change that fixes quite a few 
issues... :-) Really, the situation before the change was *much* worse. 
Unfortunately, the solution you propose does not work, since the sender of 
the message can not peak into the queue of the receiver (unless I am 
missing something). However, Ingo posted a solution that would work a 
couple mails back. We are happily accepting patches. ;-)

Best regards,
-Stephan

Other related posts: