Index: ui/views/widget/desktop_aura/x11_desktop_handler.cc |
diff --git a/ui/views/widget/desktop_aura/x11_desktop_handler.cc b/ui/views/widget/desktop_aura/x11_desktop_handler.cc |
index ee90cbc5fae046d7aeee9284c7adbb84b0e58f4c..dc3c8acc860ab8aa6faa19b1b38d5ebf70183fa9 100644 |
--- a/ui/views/widget/desktop_aura/x11_desktop_handler.cc |
+++ b/ui/views/widget/desktop_aura/x11_desktop_handler.cc |
@@ -136,6 +136,12 @@ bool X11DesktopHandler::IsActiveWindow(::Window window) const { |
} |
void X11DesktopHandler::ProcessXEvent(XEvent* event) { |
+ // Ignore focus events in modes other than NotifyNormal (i.e. NotifyGrab), as |
+ // they are always sent when the pointer is over our window, even if the |
+ // input focus is in a different window. |
+ if (event->xfocus.mode != NotifyNormal) |
+ return; |
+ |
switch (event->type) { |
case FocusIn: |
if (current_window_ != event->xfocus.window) |