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

Side by Side Diff: ash/touch/touch_transformer_controller.cc

Issue 958123003: Fix touch in software mirror mode when there is no internal display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/touch/touch_transformer_controller.h" 5 #include "ash/touch/touch_transformer_controller.h"
6 6
7 #include "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/display/display_manager.h" 8 #include "ash/display/display_manager.h"
9 #include "ash/host/ash_window_tree_host.h" 9 #include "ash/host/ash_window_tree_host.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 197 }
198 198
199 if (display_state == ui::MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED) { 199 if (display_state == ui::MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED) {
200 // In extended but software mirroring mode, ther is only one X root window 200 // In extended but software mirroring mode, ther is only one X root window
201 // that associates with both displays. 201 // that associates with both displays.
202 if (GetDisplayManager()->software_mirroring_enabled()) { 202 if (GetDisplayManager()->software_mirroring_enabled()) {
203 aura::Window* root = display_controller->GetPrimaryRootWindow(); 203 aura::Window* root = display_controller->GetPrimaryRootWindow();
204 RootWindowController::ForWindow(root)->ash_host()->UpdateDisplayID( 204 RootWindowController::ForWindow(root)->ash_host()->UpdateDisplayID(
205 display1_id, display2_id); 205 display1_id, display2_id);
206 DisplayInfo source_display = 206 DisplayInfo source_display =
207 gfx::Display::InternalDisplayId() == display1_id ? 207 display_controller->GetPrimaryDisplayId() == display1_id ? display1
208 display1 : display2; 208 : display2;
oshima 2015/02/27 22:13:54 primary display can be external on the device that
pkotwicz 2015/03/01 01:51:14 That is true. However, in software mirror mode, if
pkotwicz 2015/03/01 03:32:50 Even if the internal display is not the primary di
209 // Mapping from framebuffer size to the source display's native 209 // Mapping from framebuffer size to the source display's native
210 // resolution. 210 // resolution.
211 device_manager->UpdateTouchInfoForDisplay( 211 device_manager->UpdateTouchInfoForDisplay(
212 display1_id, display1.touch_device_id(), 212 display1_id, display1.touch_device_id(),
213 GetTouchTransform(source_display, display1, 213 GetTouchTransform(source_display, display1,
214 FindTouchscreenById(display1.touch_device_id()), 214 FindTouchscreenById(display1.touch_device_id()),
215 fb_size)); 215 fb_size));
216 device_manager->UpdateTouchInfoForDisplay( 216 device_manager->UpdateTouchInfoForDisplay(
217 display2_id, display2.touch_device_id(), 217 display2_id, display2.touch_device_id(),
218 GetTouchTransform(source_display, display2, 218 GetTouchTransform(source_display, display2,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 void TouchTransformerController::OnDisplaysInitialized() { 259 void TouchTransformerController::OnDisplaysInitialized() {
260 UpdateTouchTransformer(); 260 UpdateTouchTransformer();
261 } 261 }
262 262
263 void TouchTransformerController::OnDisplayConfigurationChanged() { 263 void TouchTransformerController::OnDisplayConfigurationChanged() {
264 UpdateTouchTransformer(); 264 UpdateTouchTransformer();
265 } 265 }
266 266
267 } // namespace ash 267 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698