From: Gerd Moellmann Date: Fri, 8 Oct 1999 11:33:09 +0000 (+0000) Subject: (XTread_socket) : X-Git-Tag: emacs-pretest-21.0.90~6523 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f1da8f069e2a42d89050db34fe95d1ce0bae3b3f;p=emacs.git (XTread_socket) : Don't call XSetInputFocus because that can generate additional FocusIn events. --- diff --git a/src/ChangeLog b/src/ChangeLog index b759ef5778a..2e8ce90eb55 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +1999-10-08 Gerd Moellmann + + * xterm.c (XTread_socket) : + Don't call XSetInputFocus because that can generate additional + FocusIn events. + 1999-10-07 Jeffrey C Honig * bsdos4.h [HAVE_LIBNCURSES]: Define TERMINFO and LIBS_TERMCAP. diff --git a/src/xterm.c b/src/xterm.c index f1725b31a10..2c671ffced2 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -8723,6 +8723,19 @@ XTread_socket (sd, bufp, numchars, expected) if (f && FRAME_XIC (f)) XSetICFocus (FRAME_XIC (f)); #endif +#if 0 /* Emacs sets WM hints whose `input' field is `true'. This + instructs the WM to set the input focus automatically for + Emacs with a call to XSetInputFocus. Setting WM_TAKE_FOCUS + tells the WM to send us a ClientMessage WM_TAKE_FOCUS after + it has set the focus. So, XSetInputFocus below is not + needed. + + The call to XSetInputFocus below has also caused trouble. In + cases where the XSetInputFocus done by the WM and the one + below are temporally close (on a fast machine), the call + below can generate additional FocusIn events which confuse + Emacs. */ + /* Since we set WM_TAKE_FOCUS, we must call XSetInputFocus explicitly. But not if f is null, since that might be an event for a deleted frame. */ @@ -8743,6 +8756,7 @@ XTread_socket (sd, bufp, numchars, expected) x_uncatch_errors (d, count); } /* Not certain about handling scroll bars here */ +#endif /* 0 */ } else if (event.xclient.data.l[0] == dpyinfo->Xatom_wm_save_yourself)