summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShu Chen <shuchen@google.com>2015-07-01 09:32:31 +0800
committerShu Chen <shuchen@google.com>2015-07-01 01:33:42 +0000
commit7dd203096f1f189e46ff6b9164f757fe53e12ef9 (patch)
tree059ba9527d56e77f8390b8892624795fc8f1dc25
parent8e40b6ad29b9bd9f35c9add6a788248a8a57fc2f (diff)
downloadchromium_src-7dd203096f1f189e46ff6b9164f757fe53e12ef9.zip
chromium_src-7dd203096f1f189e46ff6b9164f757fe53e12ef9.tar.gz
chromium_src-7dd203096f1f189e46ff6b9164f757fe53e12ef9.tar.bz2
Fix FocusIn/FocusOut handling: only ignore NotifyPointer events.
The previous commit was too broad and broke focus handling for some users. BUG=478696 Review URL: https://codereview.chromium.org/1174353005 Cr-Commit-Position: refs/heads/master@{#335438} (cherry picked from commit dc22f91e66f34afbdebd55f9004cf0fa57d08c21) Review URL: https://codereview.chromium.org/1220013002. Cr-Commit-Position: refs/branch-heads/2403@{#436} Cr-Branched-From: f54b8097a9c45ed4ad308133d49f05325d6c5070-refs/heads/master@{#330231}
-rw-r--r--ui/views/widget/desktop_aura/x11_desktop_handler.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/views/widget/desktop_aura/x11_desktop_handler.cc b/ui/views/widget/desktop_aura/x11_desktop_handler.cc
index 33b6347..3faf282 100644
--- a/ui/views/widget/desktop_aura/x11_desktop_handler.cc
+++ b/ui/views/widget/desktop_aura/x11_desktop_handler.cc
@@ -136,10 +136,9 @@ 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)
+ // Ignore focus events that are being sent only because the pointer is over
+ // our window, even if the input focus is in a different window.
+ if (event->xfocus.detail == NotifyPointer)
return;
switch (event->type) {