len = XmImMbLookupString (XtWindowToWidget (event->display, event->window),
event, bufptr, bufsiz, &keysym, &status);
#else /* XIM_XLIB */
- len = XmbLookupString (xic, event, bufptr, bufsiz, &keysym, &status);
+ if (xic)
+ len = XmbLookupString (xic, event, bufptr, bufsiz, &keysym, &status);
#endif /* HAVE_XIM */
#ifdef DEBUG_XEMACS
Unfortunately native widgets break the model because they grab
the keyboard focus and nothing sets it back again. I cannot find
any reasonable way to do this elsewhere so we assert here that
- the keybpard focus is on the emacs text widget. Menus and dialogs
+ the keyboard focus is on the emacs text widget. Menus and dialogs
do this in their selection callback, but we don't want that since
a button having focus is legitimate. An edit field having focus
- is mandatory. Weirdly you get a FocusOut event when you glick in
+ is mandatory. Weirdly you get a FocusOut event when you click in
a widget-glyph but you don't get a correspondng FocusIn when you
click in the frame. Why is this? */
if (in_p