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

Unified Diff: components/mus/ws/event_dispatcher.cc

Issue 1419793006: Makes windowmanager draw non-client area (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add include Created 5 years, 1 month 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
« no previous file with comments | « components/mus/ws/connection_manager.cc ('k') | components/mus/ws/event_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/event_dispatcher.cc
diff --git a/components/mus/ws/event_dispatcher.cc b/components/mus/ws/event_dispatcher.cc
index aa06ec4a3911c2debd1eb3dcd768b2e9db25759a..2df70cadcf6cb314cdf9ee42e91d4fa687e30194 100644
--- a/components/mus/ws/event_dispatcher.cc
+++ b/components/mus/ws/event_dispatcher.cc
@@ -34,8 +34,12 @@ bool IsOnlyOneMouseButtonDown(mojom::EventFlags flags) {
bool IsLocationInNonclientArea(const ServerWindow* target,
const gfx::Point& location) {
- return target->parent() &&
- !target->client_area().Contains(location);
+ if (!target->parent())
+ return false;
+
+ gfx::Rect client_area(target->bounds().size());
+ client_area.Inset(target->client_area());
+ return !client_area.Contains(location);
}
gfx::Point EventLocationToPoint(const mojom::Event& event) {
« no previous file with comments | « components/mus/ws/connection_manager.cc ('k') | components/mus/ws/event_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698