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
This commit is contained in:
parent
85c0090b7c
commit
5cc0f07c8a
4
CHANGES
4
CHANGES
@ -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)
|
||||
|
16
src/Fl.cxx
16
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 $".
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user