Greg Ercolano wrote:
>       To be fair to FLTK, I would modify handle() to let
>       Fl_Window actually see the events so it can process them:
> 
>     int handle(int event) {
>       int ret = Fl_Window::handle(event);     // ** ADDED
>       switch(event) {
>         case FL_PUSH:
>           puts("FL_PUSH");
>           ret = 1;                            // **
>           break;
>         case FL_RELEASE:
>           puts("FL_RELEASE");
>           ret = 1;                            // **
>           break;
>         case FL_KEYDOWN:
>           hide();
>           ret = 1;                            // **
>           break;
>         default:
>           break;
>       }
>       return(ret);                            // **
>     }

        Also, I'm not sure if it's the intention to leave Fl::grab()
        in effect after the window's been hide()en, so I figure it
        makes sense to call Fl::grab(0) just before the hide().

        If I don't do this, when I hit a key to make the grab window
        go away, the second window remains fairly 'dead' to all events,
        probably because the Fl::grab() is still attached to the
        hidden window.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to