Verena wrote:
> I'm afraid I also tried making the parent window a DoubleBufferWindow,
> but to no avail...
> I'm using Fluid to generate the code for the window and it is
>
> fltk::DoubleBufferWindow* o = graphicsWin_ = new
> fltk::DoubleBufferWindow(600, 620, "The Parent Window");
> w = o;
> o->type(241);
> o->set_vertical();
> o->color((fltk::Color)0xffffff00);
> o->callback((fltk::Callback*)cb_graphicsWin_, (void*)(this));
> o->begin();
> /* some menus... */
> /* my own child widget, derived from Widget: */
> Canvas* my_canvas = new Canvas(false, 0, 0, 20, 600, 600, "label");
> my_canvas->set_vertical();
> o->end();
> o->resizable(my_canvas);
>
> Is that all sane? I'm unsure what type 241 is...
> All drawing happens in the draw() method of my Canvas, a redraw is
> regularly forced by calling
> the_canvas->set_damage(DAMAGE_CONTENTS);
> the_parent->draw();
>
> Any ideas?
> Thanks!
I suspect calling redraw() inside the draw() method is messing it up.
Try instead replacing the fltk::run() call with:
while (1) {
thecanvas->redraw();
fltk::check();
}
which is equivalent.
However the "redraw() inside draw()" method is well known due to it
being the way you got that in glut and probably should be supported.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk