summaryrefslogtreecommitdiff
path: root/src/fl_rect.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/fl_rect.cxx')
-rw-r--r--src/fl_rect.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/fl_rect.cxx b/src/fl_rect.cxx
index 272c45332..a1c06f3b6 100644
--- a/src/fl_rect.cxx
+++ b/src/fl_rect.cxx
@@ -29,6 +29,7 @@
// that minimal update works.
#include <config.h>
+#include <FL/Fl.H>
#include <FL/Fl_Widget.H>
#include <FL/fl_draw.H>
#include <FL/x.H>
@@ -534,12 +535,14 @@ void fl_push_clip(int x, int y, int w, int h) {
#endif
}
if (rstackptr < STACK_MAX) rstack[++rstackptr] = r;
+ else Fl::warning("fl_push_clip: clip stack overflow!\n");
fl_restore_clip();
}
// make there be no clip (used by fl_begin_offscreen() only!)
void fl_push_no_clip() {
if (rstackptr < STACK_MAX) rstack[++rstackptr] = 0;
+ else Fl::warning("fl_push_no_clip: clip stack overflow!\n");
fl_restore_clip();
}
@@ -548,14 +551,13 @@ void fl_pop_clip() {
if (rstackptr > 0) {
Fl_Region oldr = rstack[rstackptr--];
if (oldr) XDestroyRegion(oldr);
- }
+ } else Fl::warning("fl_pop_clip: clip stack underflow!\n");
fl_restore_clip();
}
// does this rectangle intersect current clip?
int fl_not_clipped(int x, int y, int w, int h) {
- if (x+w <= 0 || y+h <= 0 || x > Fl_Window::current()->w()
- || y > Fl_Window::current()->h()) return 0;
+ if (x+w <= 0 || y+h <= 0) return 0;
Fl_Region r = rstack[rstackptr];
#ifdef WIN32
if (!r) return 1;