diff options
-rw-r--r-- | client/x11/red_window.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/client/x11/red_window.cpp b/client/x11/red_window.cpp index c50e3074..6e8cd584 100644 --- a/client/x11/red_window.cpp +++ b/client/x11/red_window.cpp @@ -866,6 +866,11 @@ void RedWindow_p::win_proc(XEvent& event) break; } case FocusIn: + /* Ignore focus events caused by grabbed (hotkeys) */ + if (event.xfocus.mode == NotifyWhileGrabbed) { + break; + } + if (event.xany.serial < focus_serial) { DBG(0, "Ignored FocusIn win=%p (serial=%d, Last foucs serial=%d)", red_window, event.xany.serial, focus_serial); @@ -886,6 +891,11 @@ void RedWindow_p::win_proc(XEvent& event) } break; case FocusOut: + /* Ignore focus events caused by grabbed (hotkeys) */ + if (event.xfocus.mode == NotifyWhileGrabbed) { + break; + } + if (event.xany.serial <= focus_serial) { DBG(0, "Ignored FocusOut win=%p (serial=%d, Last foucs serial=%d)", red_window, event.xany.serial, focus_serial); |