From f2be114689f05817e35b38f9d78fbafd2cb5501c Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Wed, 22 Dec 1999 10:29:16 +0000 Subject: [PATCH] (XTread_socket): At the beginning of the loop, pass the frame's X window to XFilterEvent instead of None because that's the X window for which the IC was created. This makes dead accents work when the pointer is not in Emacs' frame. (XTread_socket) : Don't call XFilterEvent here. --- src/ChangeLog | 8 ++++++++ src/xterm.c | 19 ++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7997957492d..5280ae24663 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +1999-12-22 Gerd Moellmann + + * xterm.c (XTread_socket): At the beginning of the loop, pass the + frame's X window to XFilterEvent instead of None because that's + the X window for which the IC was created. This makes dead + accents work when the pointer is not in Emacs' frame. + (XTread_socket) : Don't call XFilterEvent here. + 1999-12-20 Dave Love * xfns.c (Fx_show_tip): Add missing UNGCPRO. diff --git a/src/xterm.c b/src/xterm.c index 9e21928ebcb..a2acc107095 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -8881,11 +8881,16 @@ XTread_socket (sd, bufp, numchars, expected) #ifdef HAVE_X_I18N { - struct frame *f1 = x_any_window_to_frame (dpyinfo, - event.xclient.window); - /* The necessity of the following line took me - a full work-day to decipher from the docs!! */ - if (f1 != 0 && FRAME_XIC (f1) && XFilterEvent (&event, None)) + /* Filter events for the current X input method. + XFilterEvent returns non-zero if the input method has + consumed the event. We pass the frame's X window to + XFilterEvent because that's the one for which the IC + was created. */ + struct frame *f1 + = x_any_window_to_frame (dpyinfo, event.xclient.window); + if (f1 + && FRAME_XIC (f1) + && XFilterEvent (&event, FRAME_X_WINDOW (f1))) break; } #endif @@ -9318,10 +9323,6 @@ XTread_socket (sd, bufp, numchars, expected) #ifdef HAVE_X_I18N if (FRAME_XIC (f)) { - /* The necessity of the following line took me - a full work-day to decipher from the docs!! */ - if (XFilterEvent (&event, None)) - break; nbytes = XmbLookupString (FRAME_XIC (f), &event.xkey, copy_buffer, 80, &keysym, -- 2.39.5