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

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: rebase 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
« no previous file with comments | « components/mus/ws/event_dispatcher_unittest.cc ('k') | components/mus/ws/server_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..00ac6b5528dbc0f403fe3e0bf6469aa22c9595dc 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);
+ const gfx::Rect* hit_test_mask() const { return hit_test_mask_.get(); }
+ void SetHitTestMask(const gfx::Rect& mask);
+ void ClearHitTestMask();
+
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. An empty mask
+ // means all events miss the window. If null there is no mask.
+ std::unique_ptr<gfx::Rect> hit_test_mask_;
+
base::ObserverList<ServerWindowObserver> observers_;
DISALLOW_COPY_AND_ASSIGN(ServerWindow);
« no previous file with comments | « components/mus/ws/event_dispatcher_unittest.cc ('k') | components/mus/ws/server_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698