From 09b22227690266514b67e19303bedf863115d234 Mon Sep 17 00:00:00 2001 From: mukai Date: Wed, 17 Sep 2014 18:11:29 -0700 Subject: Do not handle the large cursor window when non-desktop is closed. As is described in the comment, the large cursor window is always in the main root window when software mirroring mode. Therefore, when the non-desktop display is closed, UpdateDisplay() doesn't need to be called, because it's not in the closing desktop. BUG=412910 R=oshima@chromium.org TEST=manually && ash_unittests Review URL: https://codereview.chromium.org/549933004 Cr-Commit-Position: refs/heads/master@{#295391} --- ash/display/display_controller.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ash/display/display_controller.cc') diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc index 0105f4c..e16ffca 100644 --- a/ash/display/display_controller.cc +++ b/ash/display/display_controller.cc @@ -669,7 +669,12 @@ void DisplayController::CreateOrUpdateNonDesktopDisplay( void DisplayController::CloseNonDesktopDisplay() { mirror_window_controller_->Close(); - cursor_window_controller_->UpdateContainer(); + // If cursor_compositing is enabled for large cursor, the cursor window is + // always on the desktop display (the visible cursor on the non-desktop + // display is drawn through compositor mirroring). Therefore, it's unnecessary + // to handle the cursor_window at all. See: http://crbug.com/412910 + if (!cursor_window_controller_->is_cursor_compositing_enabled()) + cursor_window_controller_->UpdateContainer(); } void DisplayController::PreDisplayConfigurationChange(bool clear_focus) { -- cgit v1.1