Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/root_window.h" | 5 #include "ui/aura/root_window.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 823 client::CursorClient* cursor_client = client::GetCursorClient(window()); | 823 client::CursorClient* cursor_client = client::GetCursorClient(window()); |
| 824 if (cursor_client && | 824 if (cursor_client && |
| 825 !cursor_client->IsMouseEventsEnabled() && | 825 !cursor_client->IsMouseEventsEnabled() && |
| 826 (event->flags() & ui::EF_IS_SYNTHESIZED)) { | 826 (event->flags() & ui::EF_IS_SYNTHESIZED)) { |
| 827 event->SetHandled(); | 827 event->SetHandled(); |
| 828 return; | 828 return; |
| 829 } | 829 } |
| 830 | 830 |
| 831 if (IsEventCandidateForHold(*event) && !dispatching_held_event_) { | 831 if (IsEventCandidateForHold(*event) && !dispatching_held_event_) { |
| 832 if (move_hold_count_) { | 832 if (move_hold_count_) { |
| 833 if (event->type() != ui::ET_MOUSE_CAPTURE_CHANGED) | |
|
sky
2014/02/14 16:40:05
I think you should be selective here. Meaning use
dgozman
2014/02/17 14:19:59
It's inside PreDispatchMouseEvent. The only mouse
| |
| 834 SetLastMouseLocation(window(), event->root_location()); | |
| 833 held_move_event_.reset(new ui::MouseEvent(*event, target, window())); | 835 held_move_event_.reset(new ui::MouseEvent(*event, target, window())); |
| 834 event->SetHandled(); | 836 event->SetHandled(); |
| 835 return; | 837 return; |
| 836 } else { | 838 } else { |
| 837 // We may have a held event for a period between the time move_hold_count_ | 839 // We may have a held event for a period between the time move_hold_count_ |
| 838 // fell to 0 and the DispatchHeldEvents executes. Since we're going to | 840 // fell to 0 and the DispatchHeldEvents executes. Since we're going to |
| 839 // dispatch the new event directly below, we can reset the old one. | 841 // dispatch the new event directly below, we can reset the old one. |
| 840 held_move_event_.reset(); | 842 held_move_event_.reset(); |
| 841 } | 843 } |
| 842 } | 844 } |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 941 break; | 943 break; |
| 942 | 944 |
| 943 default: | 945 default: |
| 944 NOTREACHED(); | 946 NOTREACHED(); |
| 945 break; | 947 break; |
| 946 } | 948 } |
| 947 PreDispatchLocatedEvent(target, event); | 949 PreDispatchLocatedEvent(target, event); |
| 948 } | 950 } |
| 949 | 951 |
| 950 } // namespace aura | 952 } // namespace aura |
| OLD | NEW |