aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorGerd Moellmann1999-10-08 11:33:09 +0000
committerGerd Moellmann1999-10-08 11:33:09 +0000
commitf1da8f069e2a42d89050db34fe95d1ce0bae3b3f (patch)
treef0df08c272e0ec9360ab88d16c2f02a39bd74c50 /src/xterm.c
parent58af228738be2306a5b6d6f96f5a56067f9cbc09 (diff)
downloademacs-f1da8f069e2a42d89050db34fe95d1ce0bae3b3f.tar.gz
emacs-f1da8f069e2a42d89050db34fe95d1ce0bae3b3f.zip
(XTread_socket) <ClientMessage, WM_TAKE_FOCUS>:
Don't call XSetInputFocus because that can generate additional FocusIn events.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c14
1 files changed, 14 insertions, 0 deletions
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)
8723 if (f && FRAME_XIC (f)) 8723 if (f && FRAME_XIC (f))
8724 XSetICFocus (FRAME_XIC (f)); 8724 XSetICFocus (FRAME_XIC (f));
8725#endif 8725#endif
8726#if 0 /* Emacs sets WM hints whose `input' field is `true'. This
8727 instructs the WM to set the input focus automatically for
8728 Emacs with a call to XSetInputFocus. Setting WM_TAKE_FOCUS
8729 tells the WM to send us a ClientMessage WM_TAKE_FOCUS after
8730 it has set the focus. So, XSetInputFocus below is not
8731 needed.
8732
8733 The call to XSetInputFocus below has also caused trouble. In
8734 cases where the XSetInputFocus done by the WM and the one
8735 below are temporally close (on a fast machine), the call
8736 below can generate additional FocusIn events which confuse
8737 Emacs. */
8738
8726 /* Since we set WM_TAKE_FOCUS, we must call 8739 /* Since we set WM_TAKE_FOCUS, we must call
8727 XSetInputFocus explicitly. But not if f is null, 8740 XSetInputFocus explicitly. But not if f is null,
8728 since that might be an event for a deleted frame. */ 8741 since that might be an event for a deleted frame. */
@@ -8743,6 +8756,7 @@ XTread_socket (sd, bufp, numchars, expected)
8743 x_uncatch_errors (d, count); 8756 x_uncatch_errors (d, count);
8744 } 8757 }
8745 /* Not certain about handling scroll bars here */ 8758 /* Not certain about handling scroll bars here */
8759#endif /* 0 */
8746 } 8760 }
8747 else if (event.xclient.data.l[0] 8761 else if (event.xclient.data.l[0]
8748 == dpyinfo->Xatom_wm_save_yourself) 8762 == dpyinfo->Xatom_wm_save_yourself)