Index: ui/views/widget/desktop_aura/desktop_screen_x11.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11.cc b/ui/views/widget/desktop_aura/desktop_screen_x11.cc |
index 9358875895ac0bd2f1aadb30c27df4f1fd018773..8d8bd02ee8311ee6be0c50efcaf369ed7d1c4651 100644 |
--- a/ui/views/widget/desktop_aura/desktop_screen_x11.cc |
+++ b/ui/views/widget/desktop_aura/desktop_screen_x11.cc |
@@ -187,10 +187,10 @@ gfx::Display DesktopScreenX11::GetDisplayNearestWindow( |
// create the aura::RootWindow. So we ask what the DRWHX11 believes the |
// window bounds are instead of going through the aura::Window's screen |
// bounds. |
- aura::RootWindow* root_window = window->GetRootWindow(); |
- if (root_window) { |
+ aura::WindowEventDispatcher* dispatcher = window->GetDispatcher(); |
+ if (dispatcher) { |
DesktopRootWindowHostX11* rwh = DesktopRootWindowHostX11::GetHostForXID( |
- root_window->GetAcceleratedWidget()); |
+ dispatcher->GetAcceleratedWidget()); |
if (rwh) |
return GetDisplayMatching(rwh->GetX11RootWindowBounds()); |
} |