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

Unified Diff: components/mus/ws/server_window.h

Issue 1991973003: mash: Preliminary support for widget hit test masks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add bug link for SkPath conversion Created 4 years, 7 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: components/mus/ws/server_window.h
diff --git a/components/mus/ws/server_window.h b/components/mus/ws/server_window.h
index 4baf37b2b1a5cde0420afc84ba6192581f8583c9..05db1876d7fa2ac18ea586d0a8da12837f42281a 100644
--- a/components/mus/ws/server_window.h
+++ b/components/mus/ws/server_window.h
@@ -82,6 +82,10 @@ class ServerWindow {
void SetClientArea(const gfx::Insets& insets,
const std::vector<gfx::Rect>& additional_client_areas);
+ bool HasHitTestMask() const { return !hit_test_mask_.IsEmpty(); }
+ const gfx::Rect& hit_test_mask() const { return hit_test_mask_; }
+ void set_hit_test_mask(const gfx::Rect& mask) { hit_test_mask_ = mask; }
+
int32_t cursor() const { return static_cast<int32_t>(cursor_id_); }
int32_t non_client_cursor() const {
return static_cast<int32_t>(non_client_cursor_id_);
@@ -230,6 +234,10 @@ class ServerWindow {
// amount.
gfx::Insets extended_hit_test_region_;
+ // Mouse events outside the hit test mask don't hit the window. If empty
+ // there is no mask.
+ gfx::Rect hit_test_mask_;
sky 2016/05/19 18:13:17 I think this should be a pointer, so that clients
James Cook 2016/05/19 21:47:46 Done.
+
base::ObserverList<ServerWindowObserver> observers_;
DISALLOW_COPY_AND_ASSIGN(ServerWindow);

Powered by Google App Engine
This is Rietveld 408576698