aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Love2003-05-21 22:12:15 +0000
committerDave Love2003-05-21 22:12:15 +0000
commit1576f1ad14ae2b894aaf812262ea2320fe1971c6 (patch)
tree979d53c44acf5223b5d47a492a010aabee888790 /src
parent51f3cc3b8ab8c318dfe19d819cfd10c57e3febb8 (diff)
downloademacs-1576f1ad14ae2b894aaf812262ea2320fe1971c6.tar.gz
emacs-1576f1ad14ae2b894aaf812262ea2320fe1971c6.zip
(x_window, x_window): Use use_xim.
Diffstat (limited to 'src')
-rw-r--r--src/xfns.c79
1 files changed, 40 insertions, 39 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 774eff9d3da..f92e2124df0 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2120,7 +2120,7 @@ static XFontSet xic_create_xfontset P_ ((struct frame *, char *));
2120static XIMStyle best_xim_style P_ ((XIMStyles *, XIMStyles *)); 2120static XIMStyle best_xim_style P_ ((XIMStyles *, XIMStyles *));
2121 2121
2122 2122
2123/* Supported XIM styles, ordered by preferenc. */ 2123/* Supported XIM styles, ordered by preference. */
2124 2124
2125static XIMStyle supported_xim_styles[] = 2125static XIMStyle supported_xim_styles[] =
2126{ 2126{
@@ -2578,9 +2578,8 @@ x_window (f, window_prompting, minibuffer_only)
2578 2578
2579#ifdef HAVE_X_I18N 2579#ifdef HAVE_X_I18N
2580 FRAME_XIC (f) = NULL; 2580 FRAME_XIC (f) = NULL;
2581#ifdef USE_XIM 2581 if (use_xim)
2582 create_frame_xic (f); 2582 create_frame_xic (f);
2583#endif
2584#endif 2583#endif
2585 2584
2586 f->output_data.x->wm_hints.input = True; 2585 f->output_data.x->wm_hints.input = True;
@@ -2657,31 +2656,32 @@ x_window (f)
2657 2656
2658#ifdef HAVE_X_I18N 2657#ifdef HAVE_X_I18N
2659 FRAME_XIC (f) = NULL; 2658 FRAME_XIC (f) = NULL;
2660#ifdef USE_XIM 2659if (use_xim)
2661 BLOCK_INPUT; 2660 {
2662 create_frame_xic (f); 2661 BLOCK_INPUT;
2663 if (FRAME_XIC (f)) 2662 create_frame_xic (f);
2664 { 2663 if (FRAME_XIC (f))
2665 /* XIM server might require some X events. */ 2664 {
2666 unsigned long fevent = NoEventMask; 2665 /* XIM server might require some X events. */
2667 XGetICValues(FRAME_XIC (f), XNFilterEvents, &fevent, NULL); 2666 unsigned long fevent = NoEventMask;
2667 XGetICValues(FRAME_XIC (f), XNFilterEvents, &fevent, NULL);
2668 2668
2669 if (fevent != NoEventMask) 2669 if (fevent != NoEventMask)
2670 { 2670 {
2671 XSetWindowAttributes attributes; 2671 XSetWindowAttributes attributes;
2672 XWindowAttributes wattr; 2672 XWindowAttributes wattr;
2673 unsigned long attribute_mask; 2673 unsigned long attribute_mask;
2674 2674
2675 XGetWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 2675 XGetWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
2676 &wattr); 2676 &wattr);
2677 attributes.event_mask = wattr.your_event_mask | fevent; 2677 attributes.event_mask = wattr.your_event_mask | fevent;
2678 attribute_mask = CWEventMask; 2678 attribute_mask = CWEventMask;
2679 XChangeWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 2679 XChangeWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
2680 attribute_mask, &attributes); 2680 attribute_mask, &attributes);
2681 } 2681 }
2682 } 2682 }
2683 UNBLOCK_INPUT; 2683 UNBLOCK_INPUT;
2684#endif 2684 }
2685#endif 2685#endif
2686} 2686}
2687 2687
@@ -2721,19 +2721,20 @@ x_window (f)
2721 attribute_mask, &attributes); 2721 attribute_mask, &attributes);
2722 2722
2723#ifdef HAVE_X_I18N 2723#ifdef HAVE_X_I18N
2724#ifdef USE_XIM 2724 if use_xim
2725 create_frame_xic (f);
2726 if (FRAME_XIC (f))
2727 { 2725 {
2728 /* XIM server might require some X events. */ 2726 create_frame_xic (f);
2729 unsigned long fevent = NoEventMask; 2727 if (FRAME_XIC (f))
2730 XGetICValues(FRAME_XIC (f), XNFilterEvents, &fevent, NULL); 2728 {
2731 attributes.event_mask |= fevent; 2729 /* XIM server might require some X events. */
2732 attribute_mask = CWEventMask; 2730 unsigned long fevent = NoEventMask;
2733 XChangeWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 2731 XGetICValues(FRAME_XIC (f), XNFilterEvents, &fevent, NULL);
2734 attribute_mask, &attributes); 2732 attributes.event_mask |= fevent;
2733 attribute_mask = CWEventMask;
2734 XChangeWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
2735 attribute_mask, &attributes);
2736 }
2735 } 2737 }
2736#endif
2737#endif /* HAVE_X_I18N */ 2738#endif /* HAVE_X_I18N */
2738 2739
2739 validate_x_resource_name (); 2740 validate_x_resource_name ();