From 7a75f5b923f2ea2af30eeba25349f11d4f7f6738 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 22 Dec 2010 07:09:25 +0000 Subject: Fix STR #2474. This allows an FLTK application to be started at X startup and to respond to X input methods even if the XIM server starts after the application. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8097 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_x.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 4303f0416..162572f6c 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -1400,6 +1400,12 @@ int fl_handle(const XEvent& thisevent) fl_xmousewin = window; in_a_window = true; + { XIMStyles *xim_styles = NULL; + if(!fl_xim_im || XGetIMValues(fl_xim_im, XNQueryInputStyle, &xim_styles, NULL, NULL)) { + fl_init_xim(); + } + XFree(xim_styles); + } break; case LeaveNotify: -- cgit v1.2.3