summaryrefslogtreecommitdiff
path: root/src/drivers/Posix/Fl_Posix_System_Driver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/Posix/Fl_Posix_System_Driver.cxx')
-rw-r--r--src/drivers/Posix/Fl_Posix_System_Driver.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.cxx b/src/drivers/Posix/Fl_Posix_System_Driver.cxx
index 16c71f56e..9cdf8c2dd 100644
--- a/src/drivers/Posix/Fl_Posix_System_Driver.cxx
+++ b/src/drivers/Posix/Fl_Posix_System_Driver.cxx
@@ -20,6 +20,8 @@
#include "Fl_Posix_System_Driver.H"
#include <FL/Fl.H>
+extern XIC fl_xim_ic; // in Fl_x.cxx
+
// Pointers you can use to change FLTK to a foreign language.
// Note: Similar pointers are defined in FL/fl_ask.H and src/fl_ask.cxx
@@ -42,6 +44,24 @@ int Fl_Posix_System_Driver::XParseGeometry(const char* string, int* x, int* y,
return ::XParseGeometry(string, x, y, width, height);
}
+int Fl_Posix_System_Driver::compose(int& del) {
+ int condition;
+ unsigned char ascii = (unsigned char)Fl::e_text[0];
+ condition = (Fl::e_state & (FL_ALT | FL_META | FL_CTRL)) && !(ascii & 128) ;
+ if (condition) { del = 0; return 0;} // this stuff is to be treated as a function key
+ del = Fl::compose_state;
+ Fl::compose_state = 0;
+ // Only insert non-control characters:
+ if ( (!Fl::compose_state) && ! (ascii & ~31 && ascii!=127)) { return 0; }
+ return 1;
+}
+
+void Fl_Posix_System_Driver::compose_reset()
+{
+ Fl::compose_state = 0;
+ if (fl_xim_ic) XmbResetIC(fl_xim_ic);
+}
+
//
// End of "$Id$".
//