| 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 d9277807d443470b824144ab0ff48af2ccfcadfe..5fb28dda871a1f6ac2a391f1e9fe068eed9731eb 100644
|
| --- a/ui/views/widget/desktop_aura/desktop_screen_x11.cc
|
| +++ b/ui/views/widget/desktop_aura/desktop_screen_x11.cc
|
| @@ -137,15 +137,28 @@ void DesktopScreenX11::ProcessDisplayChange(
|
| bool found = false;
|
| for (std::vector<gfx::Display>::const_iterator old_it =
|
| old_displays.begin(); old_it != old_displays.end(); ++old_it) {
|
| - if (new_it->id() == old_it->id()) {
|
| - if (new_it->bounds() != old_it->bounds()) {
|
| - FOR_EACH_OBSERVER(gfx::DisplayObserver, observer_list_,
|
| - OnDisplayBoundsChanged(*new_it));
|
| - }
|
| + if (new_it->id() != old_it->id())
|
| + continue;
|
|
|
| - found = true;
|
| - break;
|
| + int metrics = gfx::DisplayObserver::DISPLAY_METRICS_NONE;
|
| +
|
| + if (new_it->bounds() != old_it->bounds())
|
| + metrics |= gfx::DisplayObserver::DISPLAY_METRICS_BOUNDS;
|
| +
|
| + if (new_it->rotation() != old_it->rotation())
|
| + metrics |= gfx::DisplayObserver::DISPLAY_METRICS_ROTATION;
|
| +
|
| + if (new_it->work_area() != old_it->work_area())
|
| + metrics |= gfx::DisplayObserver::DISPLAY_METRICS_WORKAREA;
|
| +
|
| + if (metrics != gfx::DisplayObserver::DISPLAY_METRICS_NONE) {
|
| + FOR_EACH_OBSERVER(gfx::DisplayObserver, observer_list_,
|
| + OnDisplayMetricsChanged(*new_it,
|
| + static_cast<gfx::DisplayObserver::MetricsType>(metrics)));
|
| }
|
| +
|
| + found = true;
|
| + break;
|
| }
|
|
|
| if (!found) {
|
|
|