summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2000-02-15 08:31:46 +0000
committerBill Spitzak <spitzak@gmail.com>2000-02-15 08:31:46 +0000
commit415db360a1c48dec11ef97857efa575221edc1e2 (patch)
treeab4909829821cfd5d179390b343724d7e0f29432 /src
parent7482800177743f80d790e74e0baea49192eb6be4 (diff)
Tiny change to Fl.H to get around bug in new gcc versions?
Change to code to try alternative cases of shortcuts suggested by Yaroslav Volovich. It should now work for foreign letters. However I was unable to get it to do anything no matter how I set the locale. It may be better to fix this by hardcoding in the iso-8859-1 character set and not use ctype at all, "locale" is a horrid travestry anyway and has done more to *prevent* internationalization than to help it by making it virtually impossible to test foreign components. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1001 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-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 $".
//