[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 1aa8780: Ignore spurious focus events
From: |
Daniel Colascione |
Subject: |
master 1aa8780: Ignore spurious focus events |
Date: |
Tue, 3 Mar 2020 21:30:03 -0500 (EST) |
branch: master
commit 1aa8780d7b3bf0b4dd227946f0c6095b2c9e545e
Author: Daniel Colascione <address@hidden>
Commit: Daniel Colascione <address@hidden>
Ignore spurious focus events
* src/xterm.c (x_detect_focus_change): Ignore FocusIn and FocusOut
events from grabs
---
src/xterm.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/xterm.c b/src/xterm.c
index 21d99f0..5d229e4 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,
case FocusIn:
case FocusOut:
+ /* Ignore transient focus events from hotkeys, window manager
+ gadgets, and other odd sources. Some buggy window managers
+ (e.g., Muffin 4.2.4) send FocusIn events of this type without
+ corresponding FocusOut events even when some other window
+ really has focus, and these kinds of focus event don't
+ correspond to real user input changes. GTK+ uses the same
+ filtering. */
+ if (event->xfocus.mode == NotifyGrab ||
+ event->xfocus.mode == NotifyUngrab)
+ return;
x_focus_changed (event->type,
(event->xfocus.detail == NotifyPointer ?
FOCUS_IMPLICIT : FOCUS_EXPLICIT),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 1aa8780: Ignore spurious focus events,
Daniel Colascione <=