| Index: components/exo/surface.cc
|
| diff --git a/components/exo/surface.cc b/components/exo/surface.cc
|
| index d68aa04186364f6113f8e13ed4730a3f94e5829c..6f57cf5f1cf789c48a2d3559e8895ecc9502e81a 100644
|
| --- a/components/exo/surface.cc
|
| +++ b/components/exo/surface.cc
|
| @@ -26,6 +26,7 @@
|
| #include "components/exo/surface_delegate.h"
|
| #include "components/exo/surface_observer.h"
|
| #include "third_party/khronos/GLES2/gl2.h"
|
| +#include "ui/aura/client/aura_constants.h"
|
| #include "ui/aura/env.h"
|
| #include "ui/aura/window_delegate.h"
|
| #include "ui/aura/window_targeter.h"
|
| @@ -52,6 +53,10 @@ namespace {
|
| // window. If unset, no surface is associated with window.
|
| DEFINE_UI_CLASS_PROPERTY_KEY(Surface*, kSurfaceKey, nullptr);
|
|
|
| +// A property key to store whether the surface should only consume
|
| +// stylus input events.
|
| +DEFINE_UI_CLASS_PROPERTY_KEY(bool, kStylusOnlyKey, false);
|
| +
|
| // Helper function that returns an iterator to the first entry in |list|
|
| // with |key|.
|
| template <typename T, typename U>
|
| @@ -634,6 +639,14 @@ void Surface::CheckIfSurfaceHierarchyNeedsCommitToNewSurfaces() {
|
| SetSurfaceHierarchyNeedsCommitToNewSurfaces();
|
| }
|
|
|
| +bool Surface::IsStylusOnly() {
|
| + return window_->GetProperty(kStylusOnlyKey);
|
| +}
|
| +
|
| +void Surface::SetStylusOnly() {
|
| + window_->SetProperty(kStylusOnlyKey, true);
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // ui::ContextFactoryObserver overrides:
|
|
|
|
|