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

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

Issue 971753008: Do not show the mouse cursor when the display is rotated in TouchView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rotate_display
Patch Set: Created 5 years, 9 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
« no previous file with comments | « ash/display/display_controller.cc ('k') | ui/aura/window_event_dispatcher_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_event_dispatcher.h" 5 #include "ui/aura/window_event_dispatcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } 201 }
202 202
203 void WindowEventDispatcher::OnHostLostMouseGrab() { 203 void WindowEventDispatcher::OnHostLostMouseGrab() {
204 mouse_pressed_handler_ = NULL; 204 mouse_pressed_handler_ = NULL;
205 mouse_moved_handler_ = NULL; 205 mouse_moved_handler_ = NULL;
206 } 206 }
207 207
208 void WindowEventDispatcher::OnCursorMovedToRootLocation( 208 void WindowEventDispatcher::OnCursorMovedToRootLocation(
209 const gfx::Point& root_location) { 209 const gfx::Point& root_location) {
210 SetLastMouseLocation(window(), root_location); 210 SetLastMouseLocation(window(), root_location);
211 synthesize_mouse_move_ = false; 211
212 // Synthesize a mouse move in case the cursor's location in root coordinates
213 // changed but its position in WindowTreeHost coordinates did not.
214 PostSynthesizeMouseMove();
212 } 215 }
213 216
214 void WindowEventDispatcher::OnPostNotifiedWindowDestroying(Window* window) { 217 void WindowEventDispatcher::OnPostNotifiedWindowDestroying(Window* window) {
215 OnWindowHidden(window, WINDOW_DESTROYED); 218 OnWindowHidden(window, WINDOW_DESTROYED);
216 } 219 }
217 220
218 //////////////////////////////////////////////////////////////////////////////// 221 ////////////////////////////////////////////////////////////////////////////////
219 // WindowEventDispatcher, private: 222 // WindowEventDispatcher, private:
220 223
221 Window* WindowEventDispatcher::window() { 224 Window* WindowEventDispatcher::window() {
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 } 891 }
889 892
890 // This flag is set depending on the gestures recognized in the call above, 893 // This flag is set depending on the gestures recognized in the call above,
891 // and needs to propagate with the forwarded event. 894 // and needs to propagate with the forwarded event.
892 event->set_may_cause_scrolling(orig_event.may_cause_scrolling()); 895 event->set_may_cause_scrolling(orig_event.may_cause_scrolling());
893 896
894 PreDispatchLocatedEvent(target, event); 897 PreDispatchLocatedEvent(target, event);
895 } 898 }
896 899
897 } // namespace aura 900 } // namespace aura
OLDNEW
« no previous file with comments | « ash/display/display_controller.cc ('k') | ui/aura/window_event_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698