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

Unified Diff: components/exo/pointer.cc

Issue 2295513002: exo: Hide cursor for direct input (Closed)
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/pointer.cc
diff --git a/components/exo/pointer.cc b/components/exo/pointer.cc
index 750be6157548ad4dd89e9c3598b011f108b8ecd5..f1c67e829cefd7460bbd9603af29d51e04fd20c7 100644
--- a/components/exo/pointer.cc
+++ b/components/exo/pointer.cc
@@ -260,6 +260,14 @@ void Pointer::OnMouseEvent(ui::MouseEvent* event) {
gfx::Point mouse_location = aura::Env::GetInstance()->last_mouse_location();
gfx::Rect bounds = widget_->GetWindowBoundsInScreen();
if (mouse_location != bounds.origin()) {
+ if (event->flags() & ui::EF_DIRECT_INPUT) {
reveman 2016/08/29 22:34:08 Can we move this check to line 255 instead? ie. (f
denniskempin 2016/08/30 00:28:11 Done.
+ if (widget_->IsVisible())
+ widget_->Hide();
+ } else {
+ if (!widget_->IsVisible())
+ widget_->Show();
+ }
+
bounds.set_origin(mouse_location);
widget_->SetBounds(bounds);
}
« 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