| Index: ui/platform_window/x11/x11_window_ozone.cc
|
| diff --git a/ui/platform_window/x11/x11_window_ozone.cc b/ui/platform_window/x11/x11_window_ozone.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f73cb368db26697e524dc6fa3e56bfd44ee6b74a
|
| --- /dev/null
|
| +++ b/ui/platform_window/x11/x11_window_ozone.cc
|
| @@ -0,0 +1,44 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "ui/platform_window/x11/x11_window.h"
|
| +
|
| +#include <X11/extensions/XInput2.h>
|
| +#include <X11/Xlib.h>
|
| +
|
| +#include "ui/events/event.h"
|
| +#include "ui/events/ozone/events_ozone.h"
|
| +#include "ui/events/x/events_x_utils.h"
|
| +#include "ui/gfx/geometry/point.h"
|
| +
|
| +namespace ui {
|
| +
|
| +void X11Window::SetCursor(PlatformCursor cursor) {}
|
| +
|
| +void X11Window::ProcessXInput2Event(XEvent* xev) {
|
| + NOTREACHED();
|
| +}
|
| +
|
| +bool X11Window::CanDispatchEvent(const PlatformEvent& event) {
|
| + return true;
|
| +}
|
| +
|
| +uint32_t X11Window::DispatchEvent(const PlatformEvent& platform_event) {
|
| + Event* event = static_cast<Event*>(platform_event);
|
| + DispatchEventFromNativeUiEvent(
|
| + event, base::Bind(&PlatformWindowDelegate::DispatchEvent,
|
| + base::Unretained(delegate_)));
|
| +
|
| + return POST_DISPATCH_STOP_PROPAGATION;
|
| +}
|
| +
|
| +bool X11Window::DispatchXEvent(const XEvent& xev) {
|
| + if (XWindowFromXEvent(xev) != xwindow_)
|
| + return false;
|
| +
|
| + ProcessXWindowEvent(xev);
|
| + return true;
|
| +}
|
| +
|
| +} // namespace ui
|
|
|