I seem to have painted myself into an odd corner.

Reduced to essentials, I have the following. (We can
talk about why I'd want to do something like this
over a beer sometime, okay?)

class Inner : public Fl_Group {
public:
    Inner(int x, int y, int w, int h, char const* label = 0)
        : Fl_Group(x, y, w, h, label)
    {
        end();
        align(FL_ALIGN_LEFT);
    }
};

class Outer : public Fl_Group {
public:
    Outer(int x, int y, int w, int h, char const* label = 0)
        : Fl_Group(x, y, w, h)
        , inner_(new Inner(x, y, w, h, label))
    {
        end();
    }
private:
    Inner* inner_;
};

Now the problem is, If a dialog should appear on top of the
the inner group's label, the label isn't redrawn after the
dialog is dismissed.  Like so:

void btn_cb(Fl_Widget*, void* v)
{
    Fl_Double_Window* w = static_cast<Fl_Double_Window*>(v);
    fl_alert("This is a Test");
}

int main()
{
    Fl_Double_Window win(600, 200, "Testing");
    new Outer(475, 40, 20, 20, "Your Message Here");
    Fl_Button* btn = new Fl_Button(300, 10, 100, 20, "Push Me");
    win.end();
    btn->callback(btn_cb, &win);
    win.show();
    return Fl::run();
}

On my system at least, when the fl_alert dialog pops up it
partly obscures the "Your Message Here" label.  Then, when
the dialog is dismissed, the part of the label that was covered
by the dialog isn't redrawn.  Iconizing then de-iconizing the
window restores it.

So, my question is, is this to be expected because of the
brain-damaged structure I've created, is it a glitch in my
environment, a bug, or what?

TIA,
Stan





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

Reply via email to