| @@ -1675,8 +1675,14 @@ void Fl_Widget::damage(uchar fl, int X, int Y, int W, int H) { | |||||
| wi->damage_ |= fl; | wi->damage_ |= fl; | ||||
| wi = wi->parent(); | wi = wi->parent(); | ||||
| if (!wi) return; | if (!wi) return; | ||||
| fl = FL_DAMAGE_CHILD; | |||||
| /* we use FL_DAMAGE_EXPOSE now because of alpha blending and FL_NO_BOX and frames... */ | |||||
| fl = FL_DAMAGE_EXPOSE; | |||||
| } | } | ||||
| fl = FL_DAMAGE_CHILD; | |||||
| /* at this point 'wi' is the window */ | |||||
| Fl_X* i = Fl_X::i((Fl_Window*)wi); | Fl_X* i = Fl_X::i((Fl_Window*)wi); | ||||
| if (!i) return; // window not mapped, so ignore it | if (!i) return; // window not mapped, so ignore it | ||||
| @@ -725,24 +725,25 @@ void Fl_Group::draw_children() { | |||||
| h() - Fl::box_dh(box())); | h() - Fl::box_dh(box())); | ||||
| } | } | ||||
| if (damage() & ~FL_DAMAGE_CHILD) { // redraw the entire thing: | |||||
| // if (damage() & ~FL_DAMAGE_CHILD) { // redraw the entire thing: | |||||
| // if ( damage() & FL_DAMAGE_ALL ) { | |||||
| for (int i=children_; i--;) { | for (int i=children_; i--;) { | ||||
| Fl_Widget& o = **a++; | Fl_Widget& o = **a++; | ||||
| draw_child(o); | draw_child(o); | ||||
| draw_outside_label(o); | draw_outside_label(o); | ||||
| } | } | ||||
| } else { // only redraw the children that need it: | |||||
| for (int i=children_; i--;) update_child(**a++); | |||||
| } | |||||
| /* } else { // only redraw the children that need it: */ | |||||
| /* for (int i=children_; i--;) update_child(**a++); */ | |||||
| /* } */ | |||||
| if (clip_children()) fl_pop_clip(); | if (clip_children()) fl_pop_clip(); | ||||
| } | } | ||||
| void Fl_Group::draw() { | void Fl_Group::draw() { | ||||
| if (damage() & ~FL_DAMAGE_CHILD) { // redraw the entire thing: | |||||
| // if (damage() & ~FL_DAMAGE_CHILD) { // redraw the entire thing: | |||||
| draw_box(); | draw_box(); | ||||
| draw_label(); | draw_label(); | ||||
| } | |||||
| // } | |||||
| draw_children(); | draw_children(); | ||||
| } | } | ||||
| @@ -106,10 +106,11 @@ void Fl_Window::draw() { | |||||
| // - we draw the box with x=0 and y=0 instead of x() and y() | // - we draw the box with x=0 and y=0 instead of x() and y() | ||||
| // - we don't draw a label | // - we don't draw a label | ||||
| if (damage() & ~FL_DAMAGE_CHILD) { // draw the entire thing | |||||
| draw_box(box(),0,0,w(),h(),color()); // draw box with x/y = 0 | |||||
| } | |||||
| draw_children(); | |||||
| // if (damage() & ~FL_DAMAGE_CHILD) { // draw the entire thing | |||||
| /* always draw the box because the children may be transparent */ | |||||
| draw_box(box(),0,0,w(),h(),color()); // draw box with x/y = 0 | |||||
| // } | |||||
| draw_children(); | |||||
| if (fl_gc && !parent() && resizable() && (!size_range_set || minh!=maxh || minw!=maxw)) { | if (fl_gc && !parent() && resizable() && (!size_range_set || minh!=maxh || minw!=maxw)) { | ||||
| int dx = Fl::box_dw(box())-Fl::box_dx(box()); | int dx = Fl::box_dw(box())-Fl::box_dx(box()); | ||||