diff options
| author | Daniel Colascione | 2020-03-03 18:27:51 -0800 |
|---|---|---|
| committer | Daniel Colascione | 2020-03-03 18:29:41 -0800 |
| commit | 1aa8780d7b3bf0b4dd227946f0c6095b2c9e545e (patch) | |
| tree | d55447c970fe51e3f263ee742198654644df74ef | |
| parent | 21ebfa1dd8129420c832031d055c708075aec02c (diff) | |
| download | emacs-1aa8780d7b3bf0b4dd227946f0c6095b2c9e545e.tar.gz emacs-1aa8780d7b3bf0b4dd227946f0c6095b2c9e545e.zip | |
Ignore spurious focus events
* src/xterm.c (x_detect_focus_change): Ignore FocusIn and FocusOut
events from grabs
| -rw-r--r-- | src/xterm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c index 21d99f0c7bb..5d229e4f524 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -4790,6 +4790,16 @@ x_detect_focus_change (struct x_display_info *dpyinfo, struct frame *frame, | |||
| 4790 | 4790 | ||
| 4791 | case FocusIn: | 4791 | case FocusIn: |
| 4792 | case FocusOut: | 4792 | case FocusOut: |
| 4793 | /* Ignore transient focus events from hotkeys, window manager | ||
| 4794 | gadgets, and other odd sources. Some buggy window managers | ||
| 4795 | (e.g., Muffin 4.2.4) send FocusIn events of this type without | ||
| 4796 | corresponding FocusOut events even when some other window | ||
| 4797 | really has focus, and these kinds of focus event don't | ||
| 4798 | correspond to real user input changes. GTK+ uses the same | ||
| 4799 | filtering. */ | ||
| 4800 | if (event->xfocus.mode == NotifyGrab || | ||
| 4801 | event->xfocus.mode == NotifyUngrab) | ||
| 4802 | return; | ||
| 4793 | x_focus_changed (event->type, | 4803 | x_focus_changed (event->type, |
| 4794 | (event->xfocus.detail == NotifyPointer ? | 4804 | (event->xfocus.detail == NotifyPointer ? |
| 4795 | FOCUS_IMPLICIT : FOCUS_EXPLICIT), | 4805 | FOCUS_IMPLICIT : FOCUS_EXPLICIT), |