Index: ash/display/display_manager.cc |
diff --git a/ash/display/display_manager.cc b/ash/display/display_manager.cc |
index 0f3bddaaf140c5b186d3b2de6a8ee3b1d3d5c211..9f483094ecc141ad5eede25fee6eefe2c90eb990 100644 |
--- a/ash/display/display_manager.cc |
+++ b/ash/display/display_manager.cc |
@@ -27,6 +27,7 @@ |
#include "ui/base/layout.h" |
#include "ui/base/resource/resource_bundle.h" |
#include "ui/gfx/display.h" |
+#include "ui/gfx/display_observer.h" |
#include "ui/gfx/rect.h" |
#include "ui/gfx/screen.h" |
#include "ui/gfx/size_conversions.h" |
@@ -347,8 +348,10 @@ void DisplayManager::SetLayoutForCurrentDisplays( |
// Primary's bounds stay the same. Just notify bounds change |
// on the secondary. |
- screen_ash_->NotifyBoundsChanged( |
- ScreenUtil::GetSecondaryDisplay()); |
+ int metrics = gfx::DisplayObserver::DISPLAY_METRICS_BOUNDS | |
+ gfx::DisplayObserver::DISPLAY_METRICS_WORKAREA; |
+ screen_ash_->NotifyMetricsChanged(ScreenUtil::GetSecondaryDisplay(), |
+ static_cast<gfx::DisplayObserver::MetricsType>(metrics)); |
if (delegate_) |
delegate_->PostDisplayConfigurationChange(); |
} |
@@ -805,7 +808,11 @@ void DisplayManager::UpdateDisplays( |
non_desktop_display_updater.reset(); |
for (std::vector<size_t>::iterator iter = changed_display_indices.begin(); |
iter != changed_display_indices.end(); ++iter) { |
- screen_ash_->NotifyBoundsChanged(displays_[*iter]); |
+ int metrics = gfx::DisplayObserver::DISPLAY_METRICS_BOUNDS | |
+ gfx::DisplayObserver::DISPLAY_METRICS_WORKAREA | |
+ gfx::DisplayObserver::DISPLAY_METRICS_ROTATION; |
oshima
2014/05/08 18:06:50
are you going to change this to notify the correct
mlamouri (slow - plz ping)
2014/05/09 16:11:39
Done. Understanding how the Display objects are ha
|
+ screen_ash_->NotifyMetricsChanged(displays_[*iter], |
+ static_cast<gfx::DisplayObserver::MetricsType>(metrics)); |
} |
if (delegate_) |
delegate_->PostDisplayConfigurationChange(); |
@@ -955,7 +962,8 @@ bool DisplayManager::UpdateDisplayBounds(int64 display_id, |
return false; |
gfx::Display* display = FindDisplayForId(display_id); |
display->SetSize(display_info_[display_id].size_in_pixel()); |
- screen_ash_->NotifyBoundsChanged(*display); |
+ screen_ash_->NotifyMetricsChanged(*display, |
+ gfx::DisplayObserver::DISPLAY_METRICS_BOUNDS); |
return true; |
} |
return false; |