Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: views/mouse_watcher.cc

Issue 7464027: Wayland support for views. views_desktop on Wayland. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updated files to latest and fixed changes for dependent CLs Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {
}

Powered by Google App Engine
This is Rietveld 408576698