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

Unified Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 83743004: Clear cursor when exiting window to avoid incorrect caching (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698