diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2004-11-23 19:09:55 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2004-11-23 19:09:55 +0000 |
| commit | 5cc0f07c8a18841ba32ec5b3a12737c9f7d13cc2 (patch) | |
| tree | 6cb74d3588e9aad72738ae30c3c39925c42aacaf | |
| parent | 85c0090b7c62ad4bc0bc3d0b7c2fcd7460dad2ba (diff) | |
Fl_Widget::damage(uchar,int,int,int,int) didn't clip the
bounding box properly (STR #626)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3916 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | CHANGES | 4 | ||||
| -rw-r--r-- | src/Fl.cxx | 16 |
2 files changed, 12 insertions, 8 deletions
@@ -1,6 +1,10 @@ CHANGES IN FLTK 1.1.6 - Documentation updates (STR #552, STR #608) + - Fl_Widget::damage(uchar,int,int,int,int) didn't clip + the bounding box properly (STR #626) + - Windows could appear on the wrong screen on OSX (STR + #628) - Fl_Double_Window produced an error on resize with X11 - FLUID didn't display menu items using images properly (STR #564) diff --git a/src/Fl.cxx b/src/Fl.cxx index 2ed58bada..f66f63c4b 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl.cxx,v 1.24.2.41.2.68 2004/09/12 20:26:23 easysw Exp $" +// "$Id: Fl.cxx,v 1.24.2.41.2.69 2004/11/23 19:09:55 easysw Exp $" // // 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) { 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) { 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: if (i->region) { @@ -1052,5 +1052,5 @@ void Fl_Window::flush() { } // -// End of "$Id: Fl.cxx,v 1.24.2.41.2.68 2004/09/12 20:26:23 easysw Exp $". +// End of "$Id: Fl.cxx,v 1.24.2.41.2.69 2004/11/23 19:09:55 easysw Exp $". // |
