OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/ui/ws/window_manager_state.h" | 5 #include "services/ui/ws/window_manager_state.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "services/shell/public/interfaces/connector.mojom.h" | 10 #include "services/shell/public/interfaces/connector.mojom.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 ServerWindowTracker tracker_; | 96 ServerWindowTracker tracker_; |
97 const ClientSpecificId client_id_; | 97 const ClientSpecificId client_id_; |
98 base::WeakPtr<Accelerator> accelerator_; | 98 base::WeakPtr<Accelerator> accelerator_; |
99 | 99 |
100 DISALLOW_COPY_AND_ASSIGN(ProcessedEventTarget); | 100 DISALLOW_COPY_AND_ASSIGN(ProcessedEventTarget); |
101 }; | 101 }; |
102 | 102 |
103 bool WindowManagerState::DebugAccelerator::Matches( | 103 bool WindowManagerState::DebugAccelerator::Matches( |
104 const ui::KeyEvent& event) const { | 104 const ui::KeyEvent& event) const { |
105 return key_code == event.key_code() && | 105 return key_code == event.key_code() && |
106 event_flags == (kAcceleratorEventFlags & event.flags()); | 106 event_flags == (kAcceleratorEventFlags & event.flags()) && |
| 107 !event.is_char(); |
107 } | 108 } |
108 | 109 |
109 WindowManagerState::QueuedEvent::QueuedEvent() {} | 110 WindowManagerState::QueuedEvent::QueuedEvent() {} |
110 WindowManagerState::QueuedEvent::~QueuedEvent() {} | 111 WindowManagerState::QueuedEvent::~QueuedEvent() {} |
111 | 112 |
112 WindowManagerState::WindowManagerState(WindowTree* window_tree) | 113 WindowManagerState::WindowManagerState(WindowTree* window_tree) |
113 : window_tree_(window_tree), event_dispatcher_(this), weak_factory_(this) { | 114 : window_tree_(window_tree), event_dispatcher_(this), weak_factory_(this) { |
114 frame_decoration_values_ = mojom::FrameDecorationValues::New(); | 115 frame_decoration_values_ = mojom::FrameDecorationValues::New(); |
115 frame_decoration_values_->max_title_bar_button_width = 0u; | 116 frame_decoration_values_->max_title_bar_button_width = 0u; |
116 | 117 |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 return display_root->root(); | 562 return display_root->root(); |
562 } | 563 } |
563 | 564 |
564 void WindowManagerState::OnEventTargetNotFound(const ui::Event& event) { | 565 void WindowManagerState::OnEventTargetNotFound(const ui::Event& event) { |
565 window_server()->SendToPointerWatchers(event, user_id(), nullptr, /* window */ | 566 window_server()->SendToPointerWatchers(event, user_id(), nullptr, /* window */ |
566 nullptr /* ignore_tree */); | 567 nullptr /* ignore_tree */); |
567 } | 568 } |
568 | 569 |
569 } // namespace ws | 570 } // namespace ws |
570 } // namespace ui | 571 } // namespace ui |
OLD | NEW |