Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Unified Diff: ash/display/display_controller.cc

Issue 1071353003: Prevent DisplayPreferences from saving incorrect rotations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/display/display_controller.cc
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc
index 166a76f0cdc26dce639190d0720e37504d73ce59..e4ac368a0a434887270d6e903242f4fff54df543 100644
--- a/ash/display/display_controller.cc
+++ b/ash/display/display_controller.cc
@@ -109,7 +109,7 @@ void SetDisplayPropertiesOnHost(AshWindowTreeHost* ash_host,
const char kInternalProp[] = "_CHROME_DISPLAY_INTERNAL";
const char kCARDINAL[] = "CARDINAL";
int xrandr_rotation = RR_Rotate_0;
- switch (info.rotation()) {
+ switch (info.Rotation(gfx::Display::ROTATION_SOURCE_ACTIVE)) {
case gfx::Display::ROTATE_0:
xrandr_rotation = RR_Rotate_0;
break;
@@ -140,7 +140,8 @@ void SetDisplayPropertiesOnHost(AshWindowTreeHost* ash_host,
scale *= kCursorMultiplierForExternalDisplays;
ui::CursorController::GetInstance()->SetCursorConfigForWindow(
- host->GetAcceleratedWidget(), info.rotation(), scale);
+ host->GetAcceleratedWidget(),
+ info.Rotation(gfx::Display::ROTATION_SOURCE_ACTIVE), scale);
#endif
#endif
scoped_ptr<RootWindowTransformer> transformer(

Powered by Google App Engine
This is Rietveld 408576698