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 /ui/base | |
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 'ui/base')
-rw-r--r-- | ui/base/win/window_impl.cc | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/ui/base/win/window_impl.cc b/ui/base/win/window_impl.cc index d265621..7c4a6cd 100644 --- a/ui/base/win/window_impl.cc +++ b/ui/base/win/window_impl.cc @@ -197,20 +197,23 @@ std::wstring WindowImpl::GetWindowClassName() { if (ClassRegistrar::GetInstance()->RetrieveClassName(class_info, &name)) return name; + HICON icon = GetDefaultWindowIcon(); + // No class found, need to register one. - WNDCLASSEX class_ex; - class_ex.cbSize = sizeof(WNDCLASSEX); - class_ex.style = class_info.style; - class_ex.lpfnWndProc = base::win::WrappedWindowProc<&WindowImpl::WndProc>; - class_ex.cbClsExtra = 0; - class_ex.cbWndExtra = 0; - class_ex.hInstance = NULL; - class_ex.hIcon = GetDefaultWindowIcon(); - class_ex.hCursor = LoadCursor(NULL, IDC_ARROW); - class_ex.hbrBackground = reinterpret_cast<HBRUSH>(class_info.background + 1); - class_ex.lpszMenuName = NULL; - class_ex.lpszClassName = name.c_str(); - class_ex.hIconSm = class_ex.hIcon; + WNDCLASSEX class_ex = { + sizeof(WNDCLASSEX), + class_info.style, + base::win::WrappedWindowProc<&WindowImpl::WndProc>, + 0, + 0, + NULL, + icon, + NULL, + reinterpret_cast<HBRUSH>(class_info.background + 1), + NULL, + name.c_str(), + icon + }; ATOM atom = RegisterClassEx(&class_ex); CHECK(atom) << GetLastError(); |