Index: ash/touch/touch_transformer_controller.cc |
diff --git a/ash/touch/touch_transformer_controller.cc b/ash/touch/touch_transformer_controller.cc |
index b99cb5a0571a804b3c6db8a302c4f08a94b9b080..cc1f5c686e1dcbeb33b18972681df24bb011fd19 100644 |
--- a/ash/touch/touch_transformer_controller.cc |
+++ b/ash/touch/touch_transformer_controller.cc |
@@ -197,7 +197,6 @@ void TouchTransformerController::UpdateTouchTransformer() const { |
return; |
} else if (display_state == ui::MULTIPLE_DISPLAY_STATE_DUAL_MIRROR || |
display_state == ui::MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED) { |
- // TODO(miletus) : Handle DUAL_EXTENDED with software mirroring. |
DisplayIdPair id_pair = GetDisplayManager()->GetCurrentDisplayIdPair(); |
display1_id = id_pair.first; |
display2_id = id_pair.second; |
@@ -236,19 +235,24 @@ void TouchTransformerController::UpdateTouchTransformer() const { |
} |
if (display_state == ui::MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED) { |
- // TODO(miletus) : Handle the case the state is DUAL_EXTENDED but it |
- // is actually doing software mirroring. |
- if (GetDisplayManager()->software_mirroring_enabled()) |
- return; |
- // In extended mode, each display is associated with one root window. |
- aura::Window* root1 = |
- display_controller->GetRootWindowForDisplayId(display1_id); |
- aura::Window* root2 = |
- display_controller->GetRootWindowForDisplayId(display2_id); |
- RootWindowController::ForWindow(root1)->ash_host()->UpdateDisplayID( |
- display1_id, gfx::Display::kInvalidDisplayID); |
- RootWindowController::ForWindow(root2)->ash_host()->UpdateDisplayID( |
- display2_id, gfx::Display::kInvalidDisplayID); |
+ // In extended but software mirroring mode, ther is only one X root window |
+ // that associates with both displays. |
+ if (GetDisplayManager()->software_mirroring_enabled()) { |
+ aura::Window* root = display_controller->GetPrimaryRootWindow(); |
+ RootWindowController::ForWindow(root)->ash_host()->UpdateDisplayID( |
+ display1_id, display2_id); |
oshima
2014/09/10 22:34:56
Does this work even if the touch screen is on exte
Yufeng Shen (Slow to review)
2014/09/11 01:14:31
right, in the external touch display case, the eve
|
+ } else { |
+ // In actual extended mode, each display is associated with one root |
+ // window. |
+ aura::Window* root1 = |
+ display_controller->GetRootWindowForDisplayId(display1_id); |
+ aura::Window* root2 = |
+ display_controller->GetRootWindowForDisplayId(display2_id); |
+ RootWindowController::ForWindow(root1)->ash_host()->UpdateDisplayID( |
+ display1_id, gfx::Display::kInvalidDisplayID); |
+ RootWindowController::ForWindow(root2)->ash_host()->UpdateDisplayID( |
+ display2_id, gfx::Display::kInvalidDisplayID); |
+ } |
gfx::Size fb_size = |
Shell::GetInstance()->display_configurator()->framebuffer_size(); |
device_manager->UpdateTouchInfoForDisplay( |