diff options
author | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-27 03:48:14 +0000 |
---|---|---|
committer | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-27 03:48:14 +0000 |
commit | 5c3039618c8877b29712a5aececb99f8b4a4dd41 (patch) | |
tree | 190f9e93f7e06cecd0c9c7164e73624bd681f658 /views/widget/root_view.cc | |
parent | e82f366761fe478f9ba29179be26937a8a376e83 (diff) | |
download | chromium_src-5c3039618c8877b29712a5aececb99f8b4a4dd41.zip chromium_src-5c3039618c8877b29712a5aececb99f8b4a4dd41.tar.gz chromium_src-5c3039618c8877b29712a5aececb99f8b4a4dd41.tar.bz2 |
Scrap WNDCLASSEX.hCursor, update GetCursorForPoint.
Default to Win arrow in View::GetCursorForPoint & RootView::UpdateCursor.
Simplify WidgetWin::SetCursor, avoid sending NULL.
Only SetCuror on client events (DWM handles non-client).
RIP TextButtonWithHandCursorOver (r57652 through r64531).
RIP WindowWin::InitClass & |resize_cursors_|.
Add OVERRIDE specifiers liberally.
BUG=35356
TEST=Cursor styles shown in Win & Linux toolkit_views.
Review URL: http://codereview.chromium.org/6880201
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/root_view.cc')
-rw-r--r-- | views/widget/root_view.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/views/widget/root_view.cc b/views/widget/root_view.cc index f69c6a4..cd9761d 100644 --- a/views/widget/root_view.cc +++ b/views/widget/root_view.cc @@ -304,12 +304,11 @@ void RootView::OnMouseMoved(const MouseEvent& event) { MouseEvent moved_event(e, this, mouse_move_handler_); mouse_move_handler_->OnMouseMoved(moved_event); - gfx::NativeCursor cursor = mouse_move_handler_->GetCursorForPoint( - moved_event.type(), moved_event.location()); - widget_->SetCursor(cursor); + if (!(event.flags() & ui::EF_IS_NON_CLIENT)) + widget_->SetCursor(mouse_move_handler_->GetCursorForPoint( + moved_event.type(), moved_event.location())); } else if (mouse_move_handler_ != NULL) { mouse_move_handler_->OnMouseExited(e); - widget_->SetCursor(NULL); } } @@ -463,7 +462,15 @@ bool RootView::ConvertPointToMouseHandler(const gfx::Point& l, gfx::Point* p) { // Input ----------------------------------------------------------------------- void RootView::UpdateCursor(const MouseEvent& event) { + if (event.flags() & ui::EF_IS_NON_CLIENT) + return; + gfx::NativeCursor cursor = NULL; +#if defined(OS_WIN) + static HCURSOR arrow = LoadCursor(NULL, IDC_ARROW); + cursor = arrow; +#endif + View* v = GetEventHandlerForPoint(event.location()); if (v && v != this) { gfx::Point l(event.location()); |