From 5101a8ea1c74729d6416278f043ec0de877706fe Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 15 Sep 2014 09:40:46 +0000 Subject: Remove commented out, alternative IM code. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10313 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_x.cxx | 43 ++++++++----------------------------------- 1 file changed, 8 insertions(+), 35 deletions(-) (limited to 'src') diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 35aa6fe63..20041dfec 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -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) ) -- cgit v1.2.3