Mercurial > emacs
diff src/xfns.c @ 49434:a4d0ee33dcce
Fix input methods for GTK.
Don't right justify GTK help menu.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Sat, 25 Jan 2003 16:25:39 +0000 |
parents | 2cbb0b823e83 |
children | 5579114f7b97 |
line wrap: on
line diff
--- a/src/xfns.c Sat Jan 25 15:14:16 2003 +0000 +++ b/src/xfns.c Sat Jan 25 16:25:39 2003 +0000 @@ -4039,6 +4039,35 @@ { if (! xg_create_frame_widgets (f)) error ("Unable to create window"); + +#ifdef HAVE_X_I18N + FRAME_XIC (f) = NULL; +#ifdef USE_XIM + BLOCK_INPUT; + create_frame_xic (f); + if (FRAME_XIC (f)) + { + /* XIM server might require some X events. */ + unsigned long fevent = NoEventMask; + XGetICValues(FRAME_XIC (f), XNFilterEvents, &fevent, NULL); + + if (fevent != NoEventMask) + { + XSetWindowAttributes attributes; + XWindowAttributes wattr; + unsigned long attribute_mask; + + XGetWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + &wattr); + attributes.event_mask = wattr.your_event_mask | fevent; + attribute_mask = CWEventMask; + XChangeWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + attribute_mask, &attributes); + } + } + UNBLOCK_INPUT; +#endif +#endif } #else /*! USE_GTK */ @@ -11761,7 +11790,7 @@ { XEvent event; XtAppNextEvent (Xt_app_con, &event); - x_dispatch_event (&event, FRAME_X_DISPLAY (f) ); + (void) x_dispatch_event (&event, FRAME_X_DISPLAY (f) ); } /* Get the result. */