diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-15 20:02:01 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-15 20:02:01 +0000 |
commit | 85388dbce44837b19641d324e46a90541b979045 (patch) | |
tree | 491a5bca182655fd297be72eecc4b4a130b67f76 | |
parent | d9500c91886585f410e046da2e35b9fc2c6f40e2 (diff) | |
download | chromium_src-85388dbce44837b19641d324e46a90541b979045.zip chromium_src-85388dbce44837b19641d324e46a90541b979045.tar.gz chromium_src-85388dbce44837b19641d324e46a90541b979045.tar.bz2 |
linux aura: Avoid trying to activate the already active window.
Trying to activate the currently active window would de-activate it first,
and then re-activate it. This can have side-effects, e.g. when a click results
in a dropdown to be displayed, the mouse-press triggers the dropdown to be
created, but because the parent window loses focus, it also causes the dropdown
to be closed (although the parent window does regain the focus immediately
afterwards).
BUG=319698
R=erg@chromium.org
Review URL: https://codereview.chromium.org/66843013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235406 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ui/views/widget/desktop_aura/x11_desktop_handler.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/views/widget/desktop_aura/x11_desktop_handler.cc b/ui/views/widget/desktop_aura/x11_desktop_handler.cc index 2eeb0db..0cfe040 100644 --- a/ui/views/widget/desktop_aura/x11_desktop_handler.cc +++ b/ui/views/widget/desktop_aura/x11_desktop_handler.cc @@ -149,6 +149,8 @@ void X11DesktopHandler::OnWillDestroyEnv() { } void X11DesktopHandler::OnActiveWindowChanged(::Window xid) { + if (current_window_ == xid) + return; DesktopRootWindowHostX11* old_host = views::DesktopRootWindowHostX11::GetHostForXID(current_window_); if (old_host) |