Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: ui/views/widget/desktop_aura/x11_desktop_handler.cc

Issue 1027883003: Only call OnActiveWindowChanged() for NotifyNormal FocusIn/FocusOut events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698