summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2003-05-20 15:29:42 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2003-05-20 15:29:42 +0000
commitb31a225083a59d3ec8869b29aed48140322ef8e2 (patch)
tree4947e0d05c7b7b7a1663b392ac90aa8b93956847
parent1cbbf7f53f9560233aa12f77ff8c51053201ffe7 (diff)
Fix compose bug on OSX.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2985 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES2
-rw-r--r--src/Fl_compose.cxx11
2 files changed, 11 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index aa47f8814..3d2684d4d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.4
+ - OSX users couldn't enter some special chars when using
+ some foreign key layouts (STR #32)
- Hiding subwindows on OSX would hide the parent window
(STR #22)
- Added thin plastic box types.
diff --git a/src/Fl_compose.cxx b/src/Fl_compose.cxx
index 66cc23960..277a26c53 100644
--- a/src/Fl_compose.cxx
+++ b/src/Fl_compose.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_compose.cxx,v 1.1.2.7.2.3 2003/01/30 21:43:04 easysw Exp $"
+// "$Id: Fl_compose.cxx,v 1.1.2.7.2.4 2003/05/20 15:29:42 easysw Exp $"
//
// Character compose processing for the Fast Light Tool Kit (FLTK).
//
@@ -76,7 +76,14 @@ int Fl::compose(int& del) {
// Alt+letters are reserved for shortcuts. But alt+foreign letters
// has to be allowed, because some key layouts require alt to be held
// down in order to type them...
- if (e_state & (FL_ALT|FL_META) && !(ascii & 128)) return 0;
+ //
+ // OSX users sometimes need to hold down ALT for keys, so we only check
+ // for META on OSX...
+#ifdef __APPLE__
+ if ((e_state & FL_META) && !(ascii & 128)) return 0;
+#else
+ if ((e_state & (FL_ALT|FL_META)) && !(ascii & 128)) return 0;
+#endif // __APPLE__
if (compose_state == 1) { // after the compose key