>
>       Sounds like something to post as an STR against 1.1.x.

Now that I know it's not my system to blame, here's a clearer
demonstration. If you push the right mouse button on the "Push Me,"
then move the mouse before releasing the button, you only get
the first ("PUSH") dialog, but everything else is fine.  I
imagine the dialog box is eating the RELEASE event.

If you release the mouse button without moving the mouse,
the second dialog("RELEASE") appears in the same position
as the first, and the esc and 'x' no longer work.  This is
the case even when the dialog pops up under the
mouse pointer.

Are there restrictions on using fl_alert() from handlers and callbacks
perhaps?

#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
#include <FL/fl_ask.H>

class Test : public Fl_Button {  // doesn't have to be Fl_Button
public:
        Test(int x, int y, int w, int h, char const* label = 0)
                : Fl_Button(x, y, w, h, label)
        {;}
        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);
        }
};

int main()
{
        Fl_Double_Window win(300, 300);
        Test* btn = new Test(100, 40, 100, 20, "Push Me");
        win.end();
        win.show();
        return Fl::run();
}

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

Reply via email to