summaryrefslogtreecommitdiff
path: root/src/Fl_compose.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2010-11-20 12:59:39 +0000
committerManolo Gouy <Manolo>2010-11-20 12:59:39 +0000
commit0b7e706de9301dd531f4d91b28d049420914970a (patch)
tree17beb75e31a4b5ac82de425f3467d19e174a2496 /src/Fl_compose.cxx
parent523d2c79d07a9e6509fbbb48f2a7750871692195 (diff)
To fix STR #2452
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7878 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_compose.cxx')
-rw-r--r--src/Fl_compose.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Fl_compose.cxx b/src/Fl_compose.cxx
index 5ff2c57a1..f79a7ff6f 100644
--- a/src/Fl_compose.cxx
+++ b/src/Fl_compose.cxx
@@ -46,25 +46,25 @@ int Fl::compose_state = 0;
#if defined(__APPLE__) || defined(WIN32)
// under Mac OS X and MS Windows, character composition is handled by the OS
int Fl::compose(int& del) {
+ del = 0;
+#ifdef WIN32
+ unsigned char ascii = (unsigned)e_text[0];
+ if ((e_state & (FL_ALT|FL_META)) && !(ascii & 128)) return 0;
+#elif defined(__APPLE__)
// this stuff is to be treated as a function key
if(Fl::e_length == 0 || Fl::e_keysym == FL_Enter || Fl::e_keysym == FL_KP_Enter ||
- Fl::e_keysym == FL_Tab || Fl::e_keysym == FL_Escape || Fl::e_state&FL_META || Fl::e_state&FL_CTRL
-#ifdef WIN32
- || Fl::e_state&FL_ALT
-#endif
- ) {
- del = 0;
+ Fl::e_keysym == FL_Tab || Fl::e_keysym == FL_Escape || Fl::e_state&FL_META || Fl::e_state&FL_CTRL ) {
return 0;
}
+#endif
if(Fl::compose_state) {
del = 1;
Fl::compose_state = 0;
}
else {
- del = 0;
#ifdef WIN32
// Only insert non-control characters:
- if (!( e_text[0] & ~31 && e_text[0] != 127) ) { return 0; }
+ if (! (ascii & ~31 && ascii!=127)) { return 0; }
#endif
}
return 1;