summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Fl.cxx9
-rw-r--r--src/fl_rect.cxx6
2 files changed, 9 insertions, 6 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index aa0700e73..dd630f286 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -1,6 +1,6 @@
#include <stdio.h>
//
-// "$Id: Fl.cxx,v 1.24.2.14 2000/01/16 04:30:36 bill Exp $"
+// "$Id: Fl.cxx,v 1.24.2.15 2000/02/15 08:31:45 bill Exp $"
//
// Main event handling code for the Fast Light Tool Kit (FLTK).
//
@@ -496,8 +496,9 @@ int Fl::handle(int event, Fl_Window* window)
// and then try a shortcut with the case of the text swapped, by
// changing the text and falling through to FL_SHORTCUT case:
- if (!isalpha(event_text()[0])) return 0;
- *(char*)(event_text()) ^= ('A'^'a');
+ {char* c = (char*)event_text(); // cast away const
+ if (!isalpha(*c)) return 0;
+ *c = isupper(*c) ? tolower(*c) : toupper(*c);}
event = FL_SHORTCUT;
case FL_SHORTCUT:
@@ -704,5 +705,5 @@ int fl_old_shortcut(const char* s) {
}
//
-// End of "$Id: Fl.cxx,v 1.24.2.14 2000/01/16 04:30:36 bill Exp $".
+// End of "$Id: Fl.cxx,v 1.24.2.15 2000/02/15 08:31:45 bill Exp $".
//
diff --git a/src/fl_rect.cxx b/src/fl_rect.cxx
index 0deea6bc4..089426ccf 100644
--- a/src/fl_rect.cxx
+++ b/src/fl_rect.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_rect.cxx,v 1.10 1999/03/04 18:32:14 mike Exp $"
+// "$Id: fl_rect.cxx,v 1.10.2.1 2000/02/15 08:31:46 bill Exp $"
//
// Rectangle drawing routines for the Fast Light Tool Kit (FLTK).
//
@@ -325,6 +325,8 @@ void fl_pop_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;
Region r = rstack[rstackptr];
#ifndef WIN32
return r ? XRectInRegion(r, x, y, w, h) : 1;
@@ -386,5 +388,5 @@ int fl_clip_box(int x, int y, int w, int h, int& X, int& Y, int& W, int& H){
}
//
-// End of "$Id: fl_rect.cxx,v 1.10 1999/03/04 18:32:14 mike Exp $".
+// End of "$Id: fl_rect.cxx,v 1.10.2.1 2000/02/15 08:31:46 bill Exp $".
//