diff options
Diffstat (limited to 'src/xfns.c')
-rw-r--r-- | src/xfns.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/xfns.c b/src/xfns.c index 8cea93c6698..91124488994 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -4179,11 +4179,15 @@ x_window (struct frame *f) { /* XIM server might require some X events. */ unsigned long fevent = NoEventMask; - XGetICValues (FRAME_XIC (f), XNFilterEvents, &fevent, NULL); - attributes.event_mask |= fevent; - attribute_mask = CWEventMask; - XChangeWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - attribute_mask, &attributes); + + if (fevent) + { + XGetICValues (FRAME_XIC (f), XNFilterEvents, &fevent, NULL); + attributes.event_mask |= fevent; + attribute_mask = CWEventMask; + XChangeWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + attribute_mask, &attributes); + } } } #endif /* HAVE_X_I18N */ |