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

Side by Side Diff: ui/aura/window_tree_host_ozone.cc

Issue 262163003: [Ozone] Proper cursor support for multi-monitor configurations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/window_tree_host_ozone.h" 5 #include "ui/aura/window_tree_host_ozone.h"
6 6
7 #include "ui/aura/window_event_dispatcher.h" 7 #include "ui/aura/window_event_dispatcher.h"
8 #include "ui/base/cursor/ozone/cursor_factory_ozone.h" 8 #include "ui/base/cursor/ozone/cursor_factory_ozone.h"
9 #include "ui/events/ozone/event_factory_ozone.h" 9 #include "ui/events/ozone/event_factory_ozone.h"
10 #include "ui/events/platform/platform_event_source.h" 10 #include "ui/events/platform/platform_event_source.h"
(...skipping 22 matching lines...) Expand all
33 33
34 WindowTreeHostOzone::~WindowTreeHostOzone() { 34 WindowTreeHostOzone::~WindowTreeHostOzone() {
35 ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); 35 ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
36 DestroyCompositor(); 36 DestroyCompositor();
37 DestroyDispatcher(); 37 DestroyDispatcher();
38 } 38 }
39 39
40 bool WindowTreeHostOzone::CanDispatchEvent(const ui::PlatformEvent& ne) { 40 bool WindowTreeHostOzone::CanDispatchEvent(const ui::PlatformEvent& ne) {
41 CHECK(ne); 41 CHECK(ne);
42 ui::Event* event = static_cast<ui::Event*>(ne); 42 ui::Event* event = static_cast<ui::Event*>(ne);
43 if (event->IsMouseEvent() || event->IsScrollEvent() || event->IsTouchEvent()) 43 if (event->IsMouseEvent() || event->IsScrollEvent())
44 return bounds_.Contains(static_cast<ui::LocatedEvent*>(event)->location()); 44 return ui::CursorFactoryOzone::GetInstance()->GetActiveWindow() == widget_;
45
45 return true; 46 return true;
46 } 47 }
47 48
48 uint32_t WindowTreeHostOzone::DispatchEvent(const ui::PlatformEvent& ne) { 49 uint32_t WindowTreeHostOzone::DispatchEvent(const ui::PlatformEvent& ne) {
49 ui::Event* event = static_cast<ui::Event*>(ne); 50 ui::Event* event = static_cast<ui::Event*>(ne);
50 ui::EventDispatchDetails details ALLOW_UNUSED = SendEventToProcessor(event); 51 ui::EventDispatchDetails details ALLOW_UNUSED = SendEventToProcessor(event);
51 return ui::POST_DISPATCH_STOP_PROPAGATION; 52 return ui::POST_DISPATCH_STOP_PROPAGATION;
52 } 53 }
53 54
54 ui::EventSource* WindowTreeHostOzone::GetEventSource() { 55 ui::EventSource* WindowTreeHostOzone::GetEventSource() {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 return new WindowTreeHostOzone(bounds); 117 return new WindowTreeHostOzone(bounds);
117 } 118 }
118 119
119 // static 120 // static
120 gfx::Size WindowTreeHost::GetNativeScreenSize() { 121 gfx::Size WindowTreeHost::GetNativeScreenSize() {
121 NOTIMPLEMENTED(); 122 NOTIMPLEMENTED();
122 return gfx::Size(); 123 return gfx::Size();
123 } 124 }
124 125
125 } // namespace aura 126 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | ui/base/cursor/ozone/cursor_factory_ozone.h » ('j') | ui/ozone/platform/dri/cursor_factory_evdev_dri.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698