| Index: ui/events/platform/x11/x11_event_source.cc
|
| diff --git a/ui/events/platform/x11/x11_event_source.cc b/ui/events/platform/x11/x11_event_source.cc
|
| index f8bbaeb4d0b2e35173f0d5734d52baf1e7b3ef0e..b01c282e24d1f5b170bbb9e0c17eb845f8a7dd54 100644
|
| --- a/ui/events/platform/x11/x11_event_source.cc
|
| +++ b/ui/events/platform/x11/x11_event_source.cc
|
| @@ -237,7 +237,11 @@ void X11EventSource::ExtractCookieDataDispatchEvent(XEvent* xevent) {
|
|
|
| dispatching_event_ = xevent;
|
|
|
| - delegate_->ProcessXEvent(xevent);
|
| + if (!filter_ || !filter_->OnPlatformEvent(xevent)) {
|
| + delegate_->ProcessXEvent(xevent);
|
| + } else {
|
| + LOG(ERROR) << "Block XEvent " << xevent;
|
| + }
|
| PostDispatchEvent(xevent);
|
|
|
| dispatching_event_ = nullptr;
|
| @@ -300,4 +304,9 @@ void X11EventSource::OnDispatcherListChanged() {
|
| }
|
| }
|
|
|
| +void X11EventSource::set_platform_key_event_filter(
|
| + keyboard_lock::PlatformKeyEventFilter* filter) {
|
| + filter_ = filter;
|
| +}
|
| +
|
| } // namespace ui
|
|
|