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/wm/core/compound_event_filter.h" | 5 #include "ui/wm/core/compound_event_filter.h" |
6 | 6 |
7 #include "base/containers/hash_tables.h" | 7 #include "base/containers/hash_tables.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "ui/aura/client/activation_client.h" | 9 #include "ui/aura/client/activation_client.h" |
10 #include "ui/aura/client/cursor_client.h" | 10 #include "ui/aura/client/cursor_client.h" |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
285 } | 285 } |
286 } | 286 } |
287 | 287 |
288 void CompoundEventFilter::OnGestureEvent(ui::GestureEvent* event) { | 288 void CompoundEventFilter::OnGestureEvent(ui::GestureEvent* event) { |
289 if (handlers_.might_have_observers()) { | 289 if (handlers_.might_have_observers()) { |
290 ObserverListBase<ui::EventHandler>::Iterator it(handlers_); | 290 ObserverListBase<ui::EventHandler>::Iterator it(handlers_); |
291 ui::EventHandler* handler; | 291 ui::EventHandler* handler; |
292 while (!event->stopped_propagation() && (handler = it.GetNext()) != NULL) | 292 while (!event->stopped_propagation() && (handler = it.GetNext()) != NULL) |
293 handler->OnGestureEvent(event); | 293 handler->OnGestureEvent(event); |
294 } | 294 } |
295 | |
296 #if defined(OS_WIN) | |
297 // A Win8 edge swipe event is a special event that does not have location | |
298 // information associated with it, and is not preceeded by an ET_TOUCH_PRESSED | |
299 // event. So we treat it specially here. | |
300 if (!event->handled() && event->type() == ui::ET_GESTURE_WIN8_EDGE_SWIPE && | |
301 !aura::Env::GetInstance()->IsMouseButtonDown()) { | |
302 SetMouseEventsEnableStateOnEvent( | |
303 static_cast<aura::Window*>(event->target()), event, false); | |
sky
2014/03/13 15:55:09
Who ends up enabling the mouse events?
zturner
2014/03/13 16:15:59
Receiving another mouse event re-enables them. Sc
| |
304 } | |
305 #endif | |
295 } | 306 } |
296 | 307 |
297 } // namespace corewm | 308 } // namespace corewm |
298 } // namespace views | 309 } // namespace views |
OLD | NEW |