diff options
| author | Richard M. Stallman | 1995-10-17 17:12:20 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-10-17 17:12:20 +0000 |
| commit | 6c183ba5dcc9382b9f4ab70859c6caeb466e24e1 (patch) | |
| tree | a683c90c24ec6e2cb05fecebbafeb8ac50817393 /src | |
| parent | 5e1cecee20f6745014f2b2a0fff80d89a5b37206 (diff) | |
| download | emacs-6c183ba5dcc9382b9f4ab70859c6caeb466e24e1.tar.gz emacs-6c183ba5dcc9382b9f4ab70859c6caeb466e24e1.zip | |
(x_term_init, XTread_socket): Add HAVE_X_I18N support.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c index 0908153ea1b..57e21af6bc3 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -3265,6 +3265,9 @@ XTread_socket (sd, bufp, numchars, waitp, expected) | |||
| 3265 | int prefix; | 3265 | int prefix; |
| 3266 | Lisp_Object part; | 3266 | Lisp_Object part; |
| 3267 | struct x_display_info *dpyinfo; | 3267 | struct x_display_info *dpyinfo; |
| 3268 | #ifdef HAVE_X_I18N | ||
| 3269 | Status status_return; | ||
| 3270 | #endif | ||
| 3268 | 3271 | ||
| 3269 | if (interrupt_input_blocked) | 3272 | if (interrupt_input_blocked) |
| 3270 | { | 3273 | { |
| @@ -3339,6 +3342,11 @@ XTread_socket (sd, bufp, numchars, waitp, expected) | |||
| 3339 | /* Since we set WM_TAKE_FOCUS, we must call | 3342 | /* Since we set WM_TAKE_FOCUS, we must call |
| 3340 | XSetInputFocus explicitly. But not if f is null, | 3343 | XSetInputFocus explicitly. But not if f is null, |
| 3341 | since that might be an event for a deleted frame. */ | 3344 | since that might be an event for a deleted frame. */ |
| 3345 | #ifdef HAVE_X_I18N | ||
| 3346 | /* Not quite sure this is needed -pd */ | ||
| 3347 | if (f) | ||
| 3348 | XSetICFocus (FRAME_XIC (f)); | ||
| 3349 | #endif | ||
| 3342 | if (f) | 3350 | if (f) |
| 3343 | XSetInputFocus (event.xclient.display, | 3351 | XSetInputFocus (event.xclient.display, |
| 3344 | event.xclient.window, | 3352 | event.xclient.window, |
| @@ -3645,8 +3653,25 @@ XTread_socket (sd, bufp, numchars, waitp, expected) | |||
| 3645 | | dpyinfo->hyper_mod_mask | 3653 | | dpyinfo->hyper_mod_mask |
| 3646 | | dpyinfo->alt_mod_mask); | 3654 | | dpyinfo->alt_mod_mask); |
| 3647 | 3655 | ||
| 3656 | #ifdef HAVE_X_I18N | ||
| 3657 | if (FRAME_XIC (f)) | ||
| 3658 | { | ||
| 3659 | /* The necessity of the following line took me | ||
| 3660 | a full work-day to decipher from the docs!! */ | ||
| 3661 | if (XFilterEvent (&event, None)) | ||
| 3662 | break; | ||
| 3663 | nbytes = XmbLookupString (FRAME_XIC (f), | ||
| 3664 | &event.xkey, copy_buffer, | ||
| 3665 | 80, &keysym, | ||
| 3666 | &status_return); | ||
| 3667 | } | ||
| 3668 | else | ||
| 3669 | nbytes = XLookupString (&event.xkey, copy_buffer, | ||
| 3670 | 80, &keysym, &compose_status); | ||
| 3671 | #else | ||
| 3648 | nbytes = XLookupString (&event.xkey, copy_buffer, | 3672 | nbytes = XLookupString (&event.xkey, copy_buffer, |
| 3649 | 80, &keysym, &compose_status); | 3673 | 80, &keysym, &compose_status); |
| 3674 | #endif | ||
| 3650 | 3675 | ||
| 3651 | orig_keysym = keysym; | 3676 | orig_keysym = keysym; |
| 3652 | 3677 | ||
| @@ -3800,6 +3825,11 @@ XTread_socket (sd, bufp, numchars, waitp, expected) | |||
| 3800 | if (f) | 3825 | if (f) |
| 3801 | x_new_focus_frame (dpyinfo, f); | 3826 | x_new_focus_frame (dpyinfo, f); |
| 3802 | 3827 | ||
| 3828 | #ifdef HAVE_X_I18N | ||
| 3829 | if (f && FRAME_XIC (f)) | ||
| 3830 | XSetICFocus (FRAME_XIC (f)); | ||
| 3831 | #endif | ||
| 3832 | |||
| 3803 | #ifdef USE_X_TOOLKIT | 3833 | #ifdef USE_X_TOOLKIT |
| 3804 | goto OTHER; | 3834 | goto OTHER; |
| 3805 | #endif /* USE_X_TOOLKIT */ | 3835 | #endif /* USE_X_TOOLKIT */ |
| @@ -3838,6 +3868,11 @@ XTread_socket (sd, bufp, numchars, waitp, expected) | |||
| 3838 | if (f && f == dpyinfo->x_focus_frame) | 3868 | if (f && f == dpyinfo->x_focus_frame) |
| 3839 | x_new_focus_frame (dpyinfo, 0); | 3869 | x_new_focus_frame (dpyinfo, 0); |
| 3840 | 3870 | ||
| 3871 | #ifdef HAVE_X_I18N | ||
| 3872 | if (f && FRAME_XIC (f)) | ||
| 3873 | XUnsetICFocus (FRAME_XIC (f)); | ||
| 3874 | #endif | ||
| 3875 | |||
| 3841 | #ifdef USE_X_TOOLKIT | 3876 | #ifdef USE_X_TOOLKIT |
| 3842 | goto OTHER; | 3877 | goto OTHER; |
| 3843 | #endif /* USE_X_TOOLKIT */ | 3878 | #endif /* USE_X_TOOLKIT */ |
| @@ -5818,6 +5853,10 @@ x_term_init (display_name, xrm_option, resource_name) | |||
| 5818 | x_initialized = 1; | 5853 | x_initialized = 1; |
| 5819 | } | 5854 | } |
| 5820 | 5855 | ||
| 5856 | #ifdef HAVE_X_I18N | ||
| 5857 | setlocale (LC_ALL, NULL); | ||
| 5858 | #endif | ||
| 5859 | |||
| 5821 | #ifdef USE_X_TOOLKIT | 5860 | #ifdef USE_X_TOOLKIT |
| 5822 | /* weiner@footloose.sps.mot.com reports that this causes | 5861 | /* weiner@footloose.sps.mot.com reports that this causes |
| 5823 | errors with X11R5: | 5862 | errors with X11R5: |