| Index: ash/screen_util.cc
|
| diff --git a/ash/screen_util.cc b/ash/screen_util.cc
|
| index c27d896e52cb2e107fb31b7c1515aba754dc14f5..7e4017e13010b38991bf301f2b8da0749f9d6199 100644
|
| --- a/ash/screen_util.cc
|
| +++ b/ash/screen_util.cc
|
| @@ -65,6 +65,16 @@ gfx::Rect ScreenUtil::GetShelfDisplayBoundsInRoot(aura::Window* window) {
|
| size.Scale(scale, scale);
|
| return gfx::Rect(gfx::ToCeiledSize(size));
|
| } else {
|
| + if (window->GetRootWindow()->bounds().IsEmpty()) {
|
| + // TODO(sad): This only happens when running with mustash, since the
|
| + // root-window here refers to the shelf Widget, which has not been
|
| + // sized/positioned yet. Use the bounds of the display in this case.
|
| + // Ideally, we would not run this code at all for mustash.
|
| + NOTIMPLEMENTED();
|
| + gfx::Display display =
|
| + gfx::Screen::GetScreen()->GetDisplayNearestWindow(window);
|
| + return gfx::Rect(display.size());
|
| + }
|
| return window->GetRootWindow()->bounds();
|
| }
|
| }
|
|
|