| Index: trunk/src/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
| ===================================================================
|
| --- trunk/src/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc (revision 255398)
|
| +++ trunk/src/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc (working copy)
|
| @@ -183,7 +183,7 @@
|
| void DesktopWindowTreeHostX11::HandleNativeWidgetActivationChanged(
|
| bool active) {
|
| if (active) {
|
| - OnHostActivated();
|
| + delegate_->OnHostActivated();
|
| open_windows().remove(xwindow_);
|
| open_windows().insert(open_windows().begin(), xwindow_);
|
| }
|
| @@ -237,6 +237,7 @@
|
| dispatcher_->window()->SetProperty(kViewsWindowForRootWindow,
|
| content_window_);
|
| dispatcher_->window()->SetProperty(kHostForRootWindow, this);
|
| + delegate_ = dispatcher_;
|
|
|
| // Ensure that the X11DesktopHandler exists so that it dispatches activation
|
| // messages to us.
|
| @@ -919,7 +920,7 @@
|
| // DesktopWindowTreeHostX11, ui::EventSource implementation:
|
|
|
| ui::EventProcessor* DesktopWindowTreeHostX11::GetEventProcessor() {
|
| - return dispatcher();
|
| + return delegate_->GetEventProcessor();
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| @@ -1127,7 +1128,7 @@
|
| void DesktopWindowTreeHostX11::OnCaptureReleased() {
|
| x11_capture_.reset();
|
| g_current_capture = NULL;
|
| - OnHostLostWindowCapture();
|
| + delegate_->OnHostLostWindowCapture();
|
| native_widget_delegate_->OnMouseCaptureLost();
|
| }
|
|
|
| @@ -1340,9 +1341,9 @@
|
| case FocusOut:
|
| if (xev->xfocus.mode != NotifyGrab) {
|
| ReleaseCapture();
|
| - OnHostLostWindowCapture();
|
| + delegate_->OnHostLostWindowCapture();
|
| } else {
|
| - dispatcher()->OnHostLostMouseGrab();
|
| + delegate_->OnHostLostMouseGrab();
|
| }
|
| break;
|
| case FocusIn:
|
| @@ -1413,7 +1414,8 @@
|
| int button = xievent->detail;
|
| if (button == kBackMouseButton || button == kForwardMouseButton) {
|
| aura::client::UserActionClient* gesture_client =
|
| - aura::client::GetUserActionClient(window());
|
| + aura::client::GetUserActionClient(
|
| + delegate_->AsDispatcher()->window());
|
| if (gesture_client) {
|
| bool reverse_direction =
|
| ui::IsTouchpadEvent(xev) && ui::IsNaturalScrollEnabled();
|
|
|