mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 16:12:13 +08:00
Fix STR #2587: under Xlib, the X input method must be reset by the Fl::compose_reset() function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8522 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -678,13 +678,7 @@ public:
|
|||||||
static int event_length() {return e_length;}
|
static int event_length() {return e_length;}
|
||||||
|
|
||||||
static int compose(int &del);
|
static int compose(int &del);
|
||||||
/**
|
static void compose_reset();
|
||||||
If the user moves the cursor, be sure to call Fl::compose_reset().
|
|
||||||
The next call to Fl::compose() will start out in an initial state. In
|
|
||||||
particular it will not set "del" to non-zero. This call is very fast
|
|
||||||
so it is ok to call it many times and in many places.
|
|
||||||
*/
|
|
||||||
static void compose_reset() {compose_state = 0;}
|
|
||||||
static int event_inside(int,int,int,int);
|
static int event_inside(int,int,int,int);
|
||||||
static int event_inside(const Fl_Widget*);
|
static int event_inside(const Fl_Widget*);
|
||||||
static int test_shortcut(Fl_Shortcut);
|
static int test_shortcut(Fl_Shortcut);
|
||||||
|
|||||||
@@ -33,6 +33,10 @@
|
|||||||
int Fl::compose_state = 0;
|
int Fl::compose_state = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(WIN32) && !defined(__APPLE__)
|
||||||
|
extern XIC fl_xim_ic;
|
||||||
|
#endif
|
||||||
|
|
||||||
/** Any text editing widget should call this for each FL_KEYBOARD event.
|
/** Any text editing widget should call this for each FL_KEYBOARD event.
|
||||||
Use of this function is very simple.
|
Use of this function is very simple.
|
||||||
|
|
||||||
@@ -76,6 +80,20 @@ int Fl::compose(int& del) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
If the user moves the cursor, be sure to call Fl::compose_reset().
|
||||||
|
The next call to Fl::compose() will start out in an initial state. In
|
||||||
|
particular it will not set "del" to non-zero. This call is very fast
|
||||||
|
so it is ok to call it many times and in many places.
|
||||||
|
*/
|
||||||
|
void Fl::compose_reset()
|
||||||
|
{
|
||||||
|
Fl::compose_state = 0;
|
||||||
|
#if !defined(WIN32) && !defined(__APPLE__)
|
||||||
|
if (fl_xim_ic) XmbResetIC(fl_xim_ic);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id$"
|
// End of "$Id$"
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user