Chromium Code Reviews| Index: ash/screen_util.cc |
| diff --git a/ash/screen_util.cc b/ash/screen_util.cc |
| index c27d896e52cb2e107fb31b7c1515aba754dc14f5..d82298c7eac5c4baaf39fe7b5d6cf0fc98b11de2 100644 |
| --- a/ash/screen_util.cc |
| +++ b/ash/screen_util.cc |
| @@ -65,6 +65,14 @@ 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. |
|
msw
2016/02/09 18:31:26
Could this always use the display bounds? When are
sadrul
2016/02/10 08:04:41
Looks like it could always use the display bounds
|
| + gfx::Display display = |
|
sky
2016/02/09 20:44:08
We shouldn't be calling this code right? I think i
sadrul
2016/02/10 08:04:41
Added a NOTIMPLEMENTED() here. We do still need th
|
| + gfx::Screen::GetScreen()->GetDisplayNearestWindow(window); |
| + return gfx::Rect(display.size()); |
| + } |
| return window->GetRootWindow()->bounds(); |
| } |
| } |