Here is how cursor is updated in ash (+aura/views).
1) CompoundEventFilter updates the cursor using WindowDelegate::GetCursor on the target.
2) Views framework uses Widget::SetSetCursor to set the cursor. Underlying aura implementation keeps the current cursor in NativeWidgetAura::cursor_, which is used in the implemenation of WindowDelegate::GetCursor.
This is how views component (such as button, textfield) sets the cursor.
Before the CL (crrev.com/c/903223), exo was setting the cursor directly using aura::client::CursorClient without updating the widget, and SurfaceTreeHost::GetCursor
was returning the incorrect cursor (which is used for the process 2) above).
gfx::NativeCursor SurfaceTreeHost::GetCursor(const gfx::Point& point) const {
return root_surface_ ? root_surface_->GetCursor() : ui::CursorType::kNull;
}
This was causing the issue b/798056.
We can't simply bypass 2) and always set the cursor in exo/pointer because the notification surface is
a part of view hierarchy. The setting icon, which is an ImageView, is placed above it and it may
set its own cursor using views framework.
Alternative way (to the CL above) is to hook up NativeViewHost::GetCursor() to
Pointer::cursor_, or Pointer::focus_cursor_>GetCursor(). This is probably more "consistent" with the views
model and may be preferred way.