Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(565)

Unified Diff: views/widget/root_view.cc

Issue 6880201: Scrap WNDCLASSEX.hCursor, update GetCursorForPoint, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use brace style struct init for WNDCLASSEX |class_ex|, fix comment. Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/view.cc ('k') | views/widget/widget_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/root_view.cc
diff --git a/views/widget/root_view.cc b/views/widget/root_view.cc
index f69c6a4d42a1a0be59ff10d3d51cbf5a43dbae15..cd9761d0096f10a7e98e3a77d43128dadc4e38bc 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());
« no previous file with comments | « views/view.cc ('k') | views/widget/widget_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698