> I imagine the dialog box is eating the RELEASE event.

>         int handle(int event)
>         {
>                 switch(event) {
>                         case FL_PUSH: fl_alert("PUSH"); return 1;
>                         case FL_RELEASE: fl_alert("RELEASE"); return 1;
>                 }
>                 return Fl_Button::handle(event);
>         }

        Watch out in the above code: it's starving PUSH and RELEASE
        events from Fl_Button's handle() method; the above switch()
        is returning before the event gets passed to the base class.

        Might be better written as:

         int handle(int event) {
             int ret = Fl_Button::handle(event);        // call this first
             switch(event) {
                 case    FL_PUSH: fl_alert("PUSH");    ret = 1; break;
                 case FL_RELEASE: fl_alert("RELEASE"); ret = 1; break;
             }
             return(ret);                               // all falls thru here
         }

        Regardless, even with the above mods it still misbehaves
        under 1.1.x-svn, causing the 'X' button to still not to
        work afterwards.

        Not only that, but after a few iterations of button pushing,
        I can get the app to not respond to anything, either the 'Push Me'
        button or the 'X' or ESC.

        So both your original and this program (with the above mods)
        might be useful in the STR used to demonstrate these problems.

        I think this is something new in FLTK; I ran this program
        under the version of FLTK I use for my commercial code, 1.1.6-utf8,
        and I can't replicate the problem.

        Probably all this info is useful for the STR that comes out of this.

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

Reply via email to