On Tue, Jul 03, 2007 at 08:32:47PM -0400, Greg Ercolano wrote:
> Jeremy Henty wrote:

> >> I'm still seeing no ENTER events and a LEAVE event whenever the
> >> pointer leaves the box *or* the window.
> 
>       To get LEAVE events, you have to return(1) from the ENTER
>       event, indicating your handler()'s interest in getting them.

Thanks, but my problem was seeing the ENTER events in the first place.
I was getting LEAVE events just fine.

>       So rewriting your app the way I generally prefer to see
>       event handling (see ***'s):

That's neat, but your version still shows the puzzling behaviour I
mentioned above: the box gets a LEAVE event whenever the pointer
leaves the *window*, *even* if it never entered the box in the first
place.  Surely this can't be the right behaviour?

> > The value returned by Fl::event() is *not*
> > the same as the value passed to handle() (!!!).
> 
>       I'm not sure if Fl::event() is supposed to be valid
>       in this context, since the argument passed to handle()
>       is the only valid event number.

What caught me out is that I was merrily using Fl::event() everywhere
and it works perfectly well for mouse events.  I only tripped over the
discrepancy when I started trying to use ENTER events.

>       handle()ers sometimes call each other with different
>       event values, so Fl::event() can't be involved.

Ah!  I hadn't realised that this happens.  Maybe that's the reason.

Regards, 

Jeremy Henty 

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to