# HG changeset patch # User Gerd Moellmann # Date 939382329 0 # Node ID eb5839cbfb160618da8039b817faa37599f68e29 # Parent 4d1e8a450aef26d8cf2711708a8990fd7386095c (XTread_socket) : Don't call XSetInputFocus because that can generate additional FocusIn events. diff -r 4d1e8a450aef -r eb5839cbfb16 src/xterm.c --- a/src/xterm.c Fri Oct 08 10:30:45 1999 +0000 +++ b/src/xterm.c Fri Oct 08 11:32:09 1999 +0000 @@ -8723,6 +8723,19 @@ 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 @@ 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)