Jim Wilson wrote:
> [... compilable code snipped ...]
>
> Looks like a bug to me.
Hmm, no, I'm fairly certain it's not a bug in fltk.
Inner's label isn't redrawing when the dialog is dismissed
because the dialog isn't obscuring the xywh of Inner or Outer.
This is hard to see, because Inner/Outer are invisible;
if you enable their border, you can see the layout is this:
---------
| PUSH ME |
---------
--
Your Message Here |XX|
--
..where "XX" shows Inner's and Outer's perimeter with the label
"Your Message Here" being drawn entirely outside of that area.
The PUSH ME button is positioned such that the alert dialog
always obscures the label, just missing obscuring the XX region,
preventing it from receiving damage that would cause the label
to redraw.
You can see it draw 'correctly' if you put your mouse over
the XX area and hit 'Spacebar' to push the button; the dialog
will then open over the XX area, damaging it, such that when
the dialog's dismissed, Inner's draw() is triggered, causing
its label to be drawn.
This is normal; FLTK does not guarantee predictable behavior
if a child draws outside the bounds of its parent(s). This breaks
the rule of how window damage is calculated.
The only reason the label is being seen at all is because
Fl_Group's clipping is disabled by default (for speed, by
decreasing the clip stack's size)
If you turn on Outer's clip, Inner's label will be clipped completely
because it's drawing outside of Outer's perimeter.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk