Remove commented out, alternative IM code.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10313 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Pierre Ossman 2014-09-15 09:40:46 +00:00
parent 61e1b18f7b
commit 5101a8ea1c

View File

@ -1279,42 +1279,15 @@ int fl_handle(const XEvent& thisevent)
if (fl_xim_ic && (xevent.type == FocusIn))
{
#define POOR_XIM
#ifdef POOR_XIM
if (xim_win != xid)
{
xim_win = xid;
XDestroyIC(fl_xim_ic);
fl_xim_ic = NULL;
fl_new_ic();
XSetICValues(fl_xim_ic,
XNFocusWindow, xevent.xclient.window,
XNClientWindow, xid,
NULL);
}
fl_set_spot(spotf, spots, spot.x, spot.y, spot.width, spot.height);
#else
if (Fl::first_window() && Fl::first_window()->modal()) {
Window x = fl_xid(Fl::first_window());
if (x != xim_win) {
xim_win = x;
XSetICValues(fl_xim_ic,
XNFocusWindow, xim_win,
XNClientWindow, xim_win,
NULL);
fl_set_spot(spotf, spots, spot.x, spot.y, spot.width, spot.height);
}
} else if (xim_win != xid && xid) {
xim_win = xid;
XSetICValues(fl_xim_ic,
XNFocusWindow, xevent.xclient.window,
XNClientWindow, xid,
//XNFocusWindow, xim_win,
//XNClientWindow, xim_win,
NULL);
fl_set_spot(spotf, spots, spot.x, spot.y, spot.width, spot.height);
if (xim_win != xid) {
xim_win = xid;
XDestroyIC(fl_xim_ic);
fl_xim_ic = NULL;
fl_new_ic();
XSetICValues(fl_xim_ic, XNFocusWindow, xevent.xclient.window,
XNClientWindow, xid, NULL);
}
#endif
fl_set_spot(spotf, spots, spot.x, spot.y, spot.width, spot.height);
}
if ( XFilterEvent((XEvent *)&xevent, 0) )