[go: nahoru, domu]

chromeos: fixs focus related issues

There are a couple of changes here:
. FocusSynchronizer should reset the active focus client when focus is
  lost. This is effectively a signal that the active window is no
  longer active.
. DesktopWindowTreeHostMus should key off
  OnActiveFocusClientChanged() to set it's active/inactive state. Mus
  only maintains the notion of focus and leaves activation up to
  clients. So, when the active focus client changes it means either
  the widget is gaining or losing activation.
. Renamed DesktopWindowTreeHost::OnNativeWidgetActivationChanged() to
  OnActiveWindowChanged. The NativeWidget here is too confusing with
  the function of the same name on Widget and NativeWidgetDelegate. I
  considered OnActivationClientActiveWindowChanged() to be more
  specific, but that is slightly misleading because this observer
  isn't installed on the ActivationClient directly.
. DesktopWindowTreeHostMus::OnActiveWindowChanged() needs to
  potentially reset the active focus client. This function is called
  when the active window at the wm::FocusController changes. This can
  correspond to a local change that needs to propagate to mus. By
  resetting the active focus client we ensure that happens.
. DesktopWindowTreeHostMus::Deactivate() waited for async
  processing. I've changed it to immediately reset active status.

BUG=730890
TEST=covered by tests

Change-Id: I5df638f8b73279d12c10b1492d9a1567145d140f
Reviewed-on: https://chromium-review.googlesource.com/669951
Reviewed-by: Elliot Glaysher <erg@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502623}
19 files changed