[haiku-development] Re: Calling BPopUpMenu.Go() causes BView not to receive MouseMoved notifications

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 16 Jan 2009 00:00:19 +0100

Mauro de Wit schrieb:
 >If that is really the case, then you are either using it wrong, or
 >there is a bug that should be fixed.

I'm developing on R5, so I assume the bug would be me ;-)
Off course I will switch to Haiku as soon as it is alpha.

 >If I recall correctly, SetMouseEventMask only applies on MouseDown and
 >is cleared after receiving a MouseUp. If you want a more permanent
 >notification SetEventMask is to be used instead. May be off on a few
 >details, that's going from memory.

I've use SetEventMask without any luck....

There are actually some bugs on R5 with regards to SetEventMask(B_POINTER_EVENTS...) and menus. Haiku should be reliable for these situations.

It's just that I sometimes find it hard to understand how the whole mechanism of the multithreaded windows work. Locking windows, event loops etc.
Still learning!

Try to stick to sending/handling BMessages and you should be safe from most locking trouble. Remember that BHandlers are only valid messaging targets once they are attached to BLoopers. So in your views, use the AttachedToWindow() hook to set yourself as target for other message senders.

Best regards,
-Stephan

Other related posts: