Index: views/mouse_watcher.cc |
diff --git a/views/mouse_watcher.cc b/views/mouse_watcher.cc |
index 810db692326bfa2947d44fbb0ccf4819f8b5e80b..ff0d2c164b238fdfdc294ccc6a48509b122e6d12 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. |
@@ -8,6 +8,7 @@ |
#include "base/message_loop.h" |
#include "base/task.h" |
#include "ui/gfx/screen.h" |
+#include "ui/wayland/events/wayland_event.h" |
sadrul
2011/08/15 14:50:23
conditional include
|
#include "views/view.h" |
#include "views/widget/widget.h" |
@@ -56,6 +57,22 @@ class MouseWatcher::Observer : public MessageLoopForUI::Observer { |
break; |
} |
} |
+#elif defined(USE_WAYLAND) |
+ MessageLoopForUI::Observer::EventStatus |
+ WillProcessEvent(ui::WaylandEvent* event) { |
sadrul
2011/08/15 14:50:23
Indent 4 space.
|
+ 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) { |
} |