[EMAIL PROTECTED] wrote:
> I have an Fl_Group, one of whose children is an
> Fl_Double_Window (just don't ask me what I'm doing, ok?).
Is the parent window a double window too, or is
it a regular window?
I don't usually use Fl_Window/Fl_Double_Window as children,
only as parent windows, so I wrote this just to see if it
works.. seems to:
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
int main() {
Fl_Double_Window *w = new Fl_Double_Window(700,300,"Test");
Fl_Group *grp = new Fl_Group(0,0,900,300);
grp->box(FL_FLAT_BOX);
grp->color(FL_RED);
Fl_Button *b1 = new Fl_Button(10,10,180,30,"Button 1");
Fl_Button *b2 = new Fl_Button(10,40,180,30,"Button 2");
Fl_Double_Window *sw = new Fl_Double_Window(220,10,400,200);
sw->box(FL_ENGRAVED_BOX);
sw->color(FL_GREEN);
Fl_Button *sb1 = new Fl_Button(10,10,180,30,"SubButton 1");
Fl_Button *sb2 = new Fl_Button(10,40,180,30,"SubButton 2");
sw->end();
grp->end();
w->end();
w->resizable(w);
w->show();
return(Fl::run());
}
> When the Group is redrawn, the child window isn't. A
> look at Fl_Group::update_child() reveals that the code
> explicitly excludes drawing children that are windows, at
> least that's how I read it.
Given the above seems to work, possibly something needs to be
added to the above to show the problem.
In your case, what is causing the group to be redrawn;
a change to the contents of the group after the window was opened,
or some such?
Fl_Group's update_child() code does seem to avoid drawing
subwindows if the damage() is only to a single child.. I don't
know what that's about.
Though it seems it's only skipped IF the damage() is for just
FL_DAMAGE_CHILD.. any other kind of damage calls each child's draw directly.
So as a workaround, whenever you want the group to redraw, try
telling the parent window to redraw, so that the whole window
is damaged.
Meanwhile someone else might be able to follow up on what
the above logic is for.
Also, possibly you can modify the above demo to be more like your
code to show the broken behavior for your STR.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk