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

Unified Diff: ash/common/system/chromeos/palette/palette_utils.cc

Issue 2303963002: cros/ash: If the partial magnifier is active, do not consume input events if over palette views. (Closed)
Patch Set: Address comments Created 4 years, 3 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/common/system/chromeos/palette/palette_utils.cc
diff --git a/ash/common/system/chromeos/palette/palette_utils.cc b/ash/common/system/chromeos/palette/palette_utils.cc
index 008dad5ac28280f3d0dc042c560fb17acba89724..52759524a2a85cd3590d308d6f1c554c10e66c4c 100644
--- a/ash/common/system/chromeos/palette/palette_utils.cc
+++ b/ash/common/system/chromeos/palette/palette_utils.cc
@@ -5,7 +5,13 @@
#include "ash/common/system/chromeos/palette/palette_utils.h"
#include "ash/common/ash_switches.h"
+#include "ash/common/shelf/wm_shelf.h"
+#include "ash/common/system/chromeos/palette/palette_tray.h"
+#include "ash/common/system/status_area_widget.h"
+#include "ash/common/wm_shell.h"
+#include "ash/common/wm_window.h"
#include "base/command_line.h"
+#include "ui/gfx/geometry/point.h"
namespace ash {
@@ -24,4 +30,15 @@ bool IsPaletteEnabledOnEveryDisplay() {
switches::kAshEnablePaletteOnAllDisplays);
}
+bool PaletteContainsPointInScreen(const gfx::Point& point) {
+ for (WmWindow* window : WmShell::Get()->GetAllRootWindows()) {
+ PaletteTray* palette_tray =
+ WmShelf::ForWindow(window)->GetStatusAreaWidget()->palette_tray();
+ if (palette_tray && palette_tray->ContainsPointInScreen(point))
+ return true;
+ }
+
+ return false;
+}
+
} // namespace ash
« no previous file with comments | « ash/common/system/chromeos/palette/palette_utils.h ('k') | ash/magnifier/partial_magnification_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698