Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
index 4eb30c4a390160483671d9f40f8d0bb4a7155cbd..71fe892b53548bfe7b3abe072e8d5e6bdb2c4950 100644 |
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
@@ -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_; |
// If we're given a parent, we need to mark ourselves as transient to another |
// window. Otherwise activation gets screwy. |
@@ -926,7 +927,7 @@ |
// DesktopWindowTreeHostX11, ui::EventSource implementation: |
ui::EventProcessor* DesktopWindowTreeHostX11::GetEventProcessor() { |
- return dispatcher(); |
+ return delegate_->GetEventProcessor(); |
} |
//////////////////////////////////////////////////////////////////////////////// |
@@ -1134,7 +1135,7 @@ |
void DesktopWindowTreeHostX11::OnCaptureReleased() { |
x11_capture_.reset(); |
g_current_capture = NULL; |
- OnHostLostWindowCapture(); |
+ delegate_->OnHostLostWindowCapture(); |
native_widget_delegate_->OnMouseCaptureLost(); |
} |
@@ -1347,9 +1348,9 @@ |
case FocusOut: |
if (xev->xfocus.mode != NotifyGrab) { |
ReleaseCapture(); |
- OnHostLostWindowCapture(); |
+ delegate_->OnHostLostWindowCapture(); |
} else { |
- dispatcher()->OnHostLostMouseGrab(); |
+ delegate_->OnHostLostMouseGrab(); |
} |
break; |
case FocusIn: |
@@ -1420,7 +1421,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(); |