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

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

Issue 446673004: Hack in order to fix crbug.com/394672 in M38 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } else { 381 } else {
382 // Make sure mouse_moved_handler gets updated. 382 // Make sure mouse_moved_handler gets updated.
383 DispatchDetails details = SynthesizeMouseMoveEvent(); 383 DispatchDetails details = SynthesizeMouseMoveEvent();
384 if (details.dispatcher_destroyed) 384 if (details.dispatcher_destroyed)
385 return; 385 return;
386 } 386 }
387 mouse_pressed_handler_ = NULL; 387 mouse_pressed_handler_ = NULL;
388 } 388 }
389 389
390 void WindowEventDispatcher::OnOtherRootGotCapture() { 390 void WindowEventDispatcher::OnOtherRootGotCapture() {
391 // Sending the mouse exit causes bugs on Windows (e.g. crbug.com/394672).
392 // TODO(pkotwicz): Fix the bugs and send mouse exit on Windows too.
393 #if !defined(OS_WIN)
sky 2014/08/06 18:01:31 I'm pretty sure this code was added for windows an
pkotwicz 2014/08/06 18:51:44 The code was added for Linux. I know because I am
391 if (mouse_moved_handler_) { 394 if (mouse_moved_handler_) {
392 // Dispatch a mouse exit to reset any state associated with hover. This is 395 // Dispatch a mouse exit to reset any state associated with hover. This is
393 // important when going from no window having capture to a window having 396 // important when going from no window having capture to a window having
394 // capture because we do not dispatch ET_MOUSE_CAPTURE_CHANGED in this case. 397 // capture because we do not dispatch ET_MOUSE_CAPTURE_CHANGED in this case.
395 DispatchDetails details = DispatchMouseExitAtPoint( 398 DispatchDetails details = DispatchMouseExitAtPoint(
396 GetLastMouseLocationInRoot()); 399 GetLastMouseLocationInRoot());
397 if (details.dispatcher_destroyed) 400 if (details.dispatcher_destroyed)
398 return; 401 return;
399 } 402 }
403 #endif
400 404
401 mouse_moved_handler_ = NULL; 405 mouse_moved_handler_ = NULL;
402 mouse_pressed_handler_ = NULL; 406 mouse_pressed_handler_ = NULL;
403 } 407 }
404 408
405 void WindowEventDispatcher::SetNativeCapture() { 409 void WindowEventDispatcher::SetNativeCapture() {
406 host_->SetCapture(); 410 host_->SetCapture();
407 } 411 }
408 412
409 void WindowEventDispatcher::ReleaseNativeCapture() { 413 void WindowEventDispatcher::ReleaseNativeCapture() {
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 break; 867 break;
864 868
865 default: 869 default:
866 NOTREACHED(); 870 NOTREACHED();
867 break; 871 break;
868 } 872 }
869 PreDispatchLocatedEvent(target, event); 873 PreDispatchLocatedEvent(target, event);
870 } 874 }
871 875
872 } // namespace aura 876 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698