diff options
| author | Gerd Moellmann | 1999-10-08 11:33:09 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 1999-10-08 11:33:09 +0000 |
| commit | f1da8f069e2a42d89050db34fe95d1ce0bae3b3f (patch) | |
| tree | f0df08c272e0ec9360ab88d16c2f02a39bd74c50 /src | |
| parent | 58af228738be2306a5b6d6f96f5a56067f9cbc09 (diff) | |
| download | emacs-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')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/xterm.c | 14 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b759ef5778a..2e8ce90eb55 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 1999-10-08 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * xterm.c (XTread_socket) <ClientMessage, WM_TAKE_FOCUS>: | ||
| 4 | Don't call XSetInputFocus because that can generate additional | ||
| 5 | FocusIn events. | ||
| 6 | |||
| 1 | 1999-10-07 Jeffrey C Honig <jch@bsdi.com> | 7 | 1999-10-07 Jeffrey C Honig <jch@bsdi.com> |
| 2 | 8 | ||
| 3 | * bsdos4.h [HAVE_LIBNCURSES]: Define TERMINFO and LIBS_TERMCAP. | 9 | * 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) | |||
| 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) |