Author: manolo
Date: 2010-11-19 11:00:50 -0800 (Fri, 19 Nov 2010)
New Revision: 7877
Log:
To fix STR #2451

Modified:
   branches/branch-1.3/src/Fl_compose.cxx

Modified: branches/branch-1.3/src/Fl_compose.cxx
===================================================================
--- branches/branch-1.3/src/Fl_compose.cxx      2010-11-18 20:33:16 UTC (rev 
7876)
+++ branches/branch-1.3/src/Fl_compose.cxx      2010-11-19 19:00:50 UTC (rev 
7877)
@@ -44,10 +44,15 @@
 #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 @@
     }
   else {
     del = 0;
+#ifdef WIN32
+    // Only insert non-control characters:
+    if (!( e_text[0] & ~31 && e_text[0] != 127) ) { return 0; }
+#endif
     }
   return 1;
 }

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to