// Main event handling code for the Fast Light Tool Kit (FLTK).
//
@ -998,12 +998,6 @@ void Fl_Widget::damage(uchar fl, int X, int Y, int W, int H) {
@@ -998,12 +998,6 @@ void Fl_Widget::damage(uchar fl, int X, int Y, int W, int H) {
Fl_X*i=Fl_X::i((Fl_Window*)wi);
if(!i)return;// window not mapped, so ignore it
if(X<=0&&Y<=0&&W>=wi->w()&&H>=wi->h()){
// if damage covers entire window delete region:
wi->damage(fl);
return;
}
// clip the damage to the window and quit if none:
if(X<0){W+=X;X=0;}
if(Y<0){H+=Y;Y=0;}
@ -1011,6 +1005,12 @@ void Fl_Widget::damage(uchar fl, int X, int Y, int W, int H) {
@@ -1011,6 +1005,12 @@ void Fl_Widget::damage(uchar fl, int X, int Y, int W, int H) {
if(H>wi->h()-Y)H=wi->h()-Y;
if(W<=0||H<=0)return;
if(!X&&!Y&&W==wi->w()&&H==wi->h()){
// if damage covers entire window delete region:
wi->damage(fl);
return;
}
if(wi->damage()){
// if we already have damage we must merge with existing region: