Commit 47e352d1 authored by Weidong Guo's avatar Weidong Guo Committed by Commit Bot

Fix software cursor issue with screen magnification enabled

After screen magnification is enabled/disabled, the preferences for the
active profile have not been updated when the cursor compositing is
being updated. Use MagnificationController::IsEnabled() instead.

BUG=814634

Change-Id: Id72c579bd3395ae2e9748858622df37086bc4220
Reviewed-on: https://chromium-review.googlesource.com/951639Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Commit-Queue: Weidong Guo <weidongg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541676}
parent 8b26462b
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "ash/ash_constants.h" #include "ash/ash_constants.h"
#include "ash/display/mirror_window_controller.h" #include "ash/display/mirror_window_controller.h"
#include "ash/display/window_tree_host_manager.h" #include "ash/display/window_tree_host_manager.h"
#include "ash/magnifier/magnification_controller.h"
#include "ash/public/cpp/ash_pref_names.h" #include "ash/public/cpp/ash_pref_names.h"
#include "ash/public/cpp/shell_window_ids.h" #include "ash/public/cpp/shell_window_ids.h"
#include "ash/root_window_controller.h" #include "ash/root_window_controller.h"
...@@ -125,6 +126,9 @@ bool CursorWindowController::ShouldEnableCursorCompositing() { ...@@ -125,6 +126,9 @@ bool CursorWindowController::ShouldEnableCursorCompositing() {
return true; return true;
} }
if (ash::Shell::Get()->magnification_controller()->IsEnabled())
return true;
PrefService* prefs = PrefService* prefs =
Shell::Get()->session_controller()->GetActivePrefService(); Shell::Get()->session_controller()->GetActivePrefService();
if (!prefs) { if (!prefs) {
...@@ -133,7 +137,6 @@ bool CursorWindowController::ShouldEnableCursorCompositing() { ...@@ -133,7 +137,6 @@ bool CursorWindowController::ShouldEnableCursorCompositing() {
} }
return prefs->GetBoolean(prefs::kAccessibilityLargeCursorEnabled) || return prefs->GetBoolean(prefs::kAccessibilityLargeCursorEnabled) ||
prefs->GetBoolean(prefs::kAccessibilityHighContrastEnabled) || prefs->GetBoolean(prefs::kAccessibilityHighContrastEnabled) ||
prefs->GetBoolean(prefs::kAccessibilityScreenMagnifierEnabled) ||
prefs->GetBoolean(prefs::kDockedMagnifierEnabled) || prefs->GetBoolean(prefs::kDockedMagnifierEnabled) ||
prefs->GetBoolean(prefs::kNightLightEnabled); prefs->GetBoolean(prefs::kNightLightEnabled);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment