diff options
author | vasilii@chromium.org <vasilii@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-25 21:21:48 +0000 |
---|---|---|
committer | vasilii@chromium.org <vasilii@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-25 21:21:48 +0000 |
commit | 2fe3a1258097951bc015142effb37c38cdc65567 (patch) | |
tree | a2676bd36cb8fd5c5cc1db39947262762f52d09e /ash/system | |
parent | 401c9dc414cd708d53ced5d884f8eb3a8b4bcbe5 (diff) | |
download | chromium_src-2fe3a1258097951bc015142effb37c38cdc65567.zip chromium_src-2fe3a1258097951bc015142effb37c38cdc65567.tar.gz chromium_src-2fe3a1258097951bc015142effb37c38cdc65567.tar.bz2 |
Refactor BubbleDelegateView::use_focuseless().
It's confusing because it prevents the bubble activation. As a side effect on Windows the bubble doesn't get LBUTTON_DOWN messages. The reason for that is in HWNDMessageHandler::OnMouseActivate(). It asks the bubble if it can be activated. It answers "no" due to implementation in BubbleDelegateView::CanActivate(). Windows gets MA_NOACTIVATEANDEAT and MouseDown event isn't dispatched. This is definitely unexpected.
The bubbles which indeed always inactive should use set_can_activate(false) at construction time.
The bubbles which can be active but created without focus by default should use ShowInactive() instead.
BUG=392734
Review URL: https://codereview.chromium.org/413433002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285682 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system')
-rw-r--r-- | ash/system/chromeos/network/network_state_list_detailed_view.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ash/system/chromeos/network/network_state_list_detailed_view.cc b/ash/system/chromeos/network/network_state_list_detailed_view.cc index 3cdbe7c..ed8a6e2 100644 --- a/ash/system/chromeos/network/network_state_list_detailed_view.cc +++ b/ash/system/chromeos/network/network_state_list_detailed_view.cc @@ -94,7 +94,7 @@ class NetworkStateListDetailedView::InfoBubble NetworkStateListDetailedView* detailed_view) : views::BubbleDelegateView(anchor, views::BubbleBorder::TOP_RIGHT), detailed_view_(detailed_view) { - set_use_focusless(true); + set_can_activate(false); set_parent_window(ash::Shell::GetContainer( anchor->GetWidget()->GetNativeWindow()->GetRootWindow(), ash::kShellWindowId_SettingBubbleContainer)); @@ -106,8 +106,6 @@ class NetworkStateListDetailedView::InfoBubble detailed_view_->OnInfoBubbleDestroyed(); } - virtual bool CanActivate() const OVERRIDE { return false; } - private: // Not owned. NetworkStateListDetailedView* detailed_view_; |