Index: components/exo/pointer.cc |
diff --git a/components/exo/pointer.cc b/components/exo/pointer.cc |
index 750be6157548ad4dd89e9c3598b011f108b8ecd5..2f324b80f7acf292fa593809bd3cbb87b7e15911 100644 |
--- a/components/exo/pointer.cc |
+++ b/components/exo/pointer.cc |
@@ -103,7 +103,7 @@ void Pointer::SetCursor(Surface* surface, const gfx::Point& hotspot) { |
surface_->window()->Show(); |
// Show widget now that cursor has been defined. |
- if (!widget_->IsVisible()) |
+ if (!widget_->IsVisible() && !is_direct_input_) |
widget_->Show(); |
} |
@@ -251,8 +251,11 @@ void Pointer::OnMouseEvent(ui::MouseEvent* event) { |
break; |
} |
+ if (focus_ && (event->flags() & ui::EF_IS_SYNTHESIZED) == 0) |
+ is_direct_input_ = (event->flags() & ui::EF_DIRECT_INPUT) != 0; |
reveman
2016/08/30 00:40:49
should we really take "focus_" into account here?
denniskempin
2016/08/30 00:47:25
I removed the check for focus_, but we do need th
reveman
2016/08/30 00:49:43
Got it. Makes sense.
|
+ |
// Update cursor widget to reflect current focus and pointer location. |
- if (focus_) { |
+ if (focus_ && !is_direct_input_) { |
if (!widget_) |
CreatePointerWidget(); |
@@ -263,6 +266,8 @@ void Pointer::OnMouseEvent(ui::MouseEvent* event) { |
bounds.set_origin(mouse_location); |
widget_->SetBounds(bounds); |
} |
+ if (!widget_->IsVisible()) |
+ widget_->Show(); |
reveman
2016/08/30 00:40:49
nit: move below UpdateCursorScale() as better to s
denniskempin
2016/08/30 00:47:25
Done.
|
UpdateCursorScale(); |
} else { |