| Index: views/mouse_watcher.cc
|
| diff --git a/views/mouse_watcher.cc b/views/mouse_watcher.cc
|
| index 810db692326bfa2947d44fbb0ccf4819f8b5e80b..83fe75d2f3ab32be141b1ec008b1db5928e50fb9 100644
|
| --- a/views/mouse_watcher.cc
|
| +++ b/views/mouse_watcher.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2011 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.
|
|
|
| @@ -11,6 +11,10 @@
|
| #include "views/view.h"
|
| #include "views/widget/widget.h"
|
|
|
| +#if defined(USE_WAYLAND)
|
| +#include "ui/wayland/events/wayland_event.h"
|
| +#endif
|
| +
|
| namespace views {
|
|
|
| // Amount of time between when the mouse moves outside the view's zone and when
|
| @@ -56,6 +60,22 @@ class MouseWatcher::Observer : public MessageLoopForUI::Observer {
|
| break;
|
| }
|
| }
|
| +#elif defined(USE_WAYLAND)
|
| + MessageLoopForUI::Observer::EventStatus WillProcessEvent(
|
| + ui::WaylandEvent* event) {
|
| + switch (event->type) {
|
| + case ui::WAYLAND_MOTION:
|
| + HandleGlobalMouseMoveEvent(false);
|
| + break;
|
| + case ui::WAYLAND_POINTER_FOCUS:
|
| + if (!event->pointer_focus.state)
|
| + HandleGlobalMouseMoveEvent(true);
|
| + break;
|
| + default:
|
| + break;
|
| + }
|
| + return EVENT_CONTINUE;
|
| + }
|
| #else
|
| void WillProcessEvent(GdkEvent* event) {
|
| }
|
|
|