summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2010-11-19 19:00:50 +0000
committerManolo Gouy <Manolo>2010-11-19 19:00:50 +0000
commit523d2c79d07a9e6509fbbb48f2a7750871692195 (patch)
tree26fb38b4a0b1a4aa1dd2b19b925373c5c5fc53ef
parentcbc29a76dbdb10407113a99c11c2654c879e7ccb (diff)
To fix STR #2451
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7877 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl_compose.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Fl_compose.cxx b/src/Fl_compose.cxx
index cb9736129..5ff2c57a1 100644
--- a/src/Fl_compose.cxx
+++ b/src/Fl_compose.cxx
@@ -44,10 +44,15 @@ int Fl::compose_state = 0;
#endif
#if defined(__APPLE__) || defined(WIN32)
-// under Mac OS X character composition is handled by the OS
+// under Mac OS X and MS Windows, character composition is handled by the OS
int Fl::compose(int& del) {
+ // 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) {
+ 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;
return 0;
}
@@ -57,6 +62,10 @@ int Fl::compose(int& del) {
}
else {
del = 0;
+#ifdef WIN32
+ // Only insert non-control characters:
+ if (!( e_text[0] & ~31 && e_text[0] != 127) ) { return 0; }
+#endif
}
return 1;
}