Chromium Code Reviews| Index: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc |
| diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc |
| index ab0172815037c8057a4ba3aafedae93f2d6aed41..98952a7cf12d2971b5806c08cb0ed9f3e124f5bb 100644 |
| --- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc |
| +++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc |
| @@ -945,6 +945,15 @@ void DesktopNativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) { |
| if (tooltip_manager_.get()) |
| tooltip_manager_->UpdateTooltip(); |
| TooltipManagerAura::UpdateTooltipManagerForCapture(GetWidget()); |
| + // This is required because the cursor is a per-thread property on Windows |
| + // (not a per-window). We don't respond to WM_SETCURSOR, but instead rely on |
| + // the cursor_client to call ::SetCursor appropriately. If we don't clear |
| + // the cursor on exiting the widget, then the next time, the cursor client |
| + // will not call ::SetCursor appropriately because it will believe it's |
| + // already set the cursor for the window (and there's a cursor client per |
|
sky
2013/11/22 21:26:47
Why does the cursor client think it's already set
|
| + // created per window). |
| + if (event->type() == ui::ET_MOUSE_EXITED) |
| + cursor_client_->SetCursor(ui::kCursorNull); |
| native_widget_delegate_->OnMouseEvent(event); |
| // WARNING: we may have been deleted. |
| } |