diff options
author | oshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-02 00:24:24 +0000 |
---|---|---|
committer | oshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-02 00:24:24 +0000 |
commit | 6bcdfa59b95aa815408c5c55f959d637220191c7 (patch) | |
tree | baa97cd225ba47ea044f65cb72470f541d2fa57c | |
parent | a81fa6b5d398b29f4b0db85514b917423bae4fcb (diff) | |
download | chromium_src-6bcdfa59b95aa815408c5c55f959d637220191c7.zip chromium_src-6bcdfa59b95aa815408c5c55f959d637220191c7.tar.gz chromium_src-6bcdfa59b95aa815408c5c55f959d637220191c7.tar.bz2 |
Enable mouse wheel scrolling on notification panel.
Set focus on scroll view so that mouse wheel events will be sent to
scroll view.
BUG=chromium-os:14079
TEST=create more than 5 notifications so that notification panel will have scroll bar. 2 finger scroll should work with this patch.
Review URL: http://codereview.chromium.org/7168001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91395 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/chromeos/notifications/notification_panel.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/notifications/notification_panel.cc b/chrome/browser/chromeos/notifications/notification_panel.cc index 25613f7..169ac03 100644 --- a/chrome/browser/chromeos/notifications/notification_panel.cc +++ b/chrome/browser/chromeos/notifications/notification_panel.cc @@ -656,6 +656,10 @@ void NotificationPanel::OnMouseLeave() { void NotificationPanel::OnMouseMotion(const gfx::Point& point) { SetActiveView(balloon_container_->FindBalloonView(point)); SET_STATE(KEEP_SIZE); + // We need to set the focus to scroll view to get mouse wheel + // working. Setting focus when mouse moves on the panel + // because focus may be taken by other view. + scroll_view_->RequestFocus(); } NotificationPanelTester* NotificationPanel::GetTester() { @@ -675,6 +679,7 @@ void NotificationPanel::Init() { views::Background::CreateSolidBackground(ResourceBundle::frame_color)); scroll_view_.reset(new views::ScrollView()); + scroll_view_->set_focusable(true); scroll_view_->set_parent_owned(false); scroll_view_->set_background( views::Background::CreateSolidBackground(SK_ColorWHITE)); |