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 "ui/ozone/platform/wayland/wayland_window.h" | 5 #include "ui/ozone/platform/wayland/wayland_window.h" |
6 | 6 |
7 #include <xdg-shell-unstable-v5-client-protocol.h> | 7 #include <xdg-shell-unstable-v5-client-protocol.h> |
8 | 8 |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 PlatformImeController* WaylandWindow::GetPlatformImeController() { | 142 PlatformImeController* WaylandWindow::GetPlatformImeController() { |
143 NOTIMPLEMENTED(); | 143 NOTIMPLEMENTED(); |
144 return nullptr; | 144 return nullptr; |
145 } | 145 } |
146 | 146 |
147 bool WaylandWindow::CanDispatchEvent(const PlatformEvent& native_event) { | 147 bool WaylandWindow::CanDispatchEvent(const PlatformEvent& native_event) { |
148 Event* event = static_cast<Event*>(native_event); | 148 Event* event = static_cast<Event*>(native_event); |
149 if (event->IsMouseEvent()) | 149 if (event->IsMouseEvent()) |
150 return has_pointer_focus_; | 150 return has_pointer_focus_; |
| 151 if (event->IsKeyEvent()) |
| 152 return has_keyboard_focus_; |
151 return false; | 153 return false; |
152 } | 154 } |
153 | 155 |
154 uint32_t WaylandWindow::DispatchEvent(const PlatformEvent& native_event) { | 156 uint32_t WaylandWindow::DispatchEvent(const PlatformEvent& native_event) { |
155 DispatchEventFromNativeUiEvent( | 157 DispatchEventFromNativeUiEvent( |
156 native_event, base::Bind(&PlatformWindowDelegate::DispatchEvent, | 158 native_event, base::Bind(&PlatformWindowDelegate::DispatchEvent, |
157 base::Unretained(delegate_))); | 159 base::Unretained(delegate_))); |
158 return POST_DISPATCH_STOP_PROPAGATION; | 160 return POST_DISPATCH_STOP_PROPAGATION; |
159 } | 161 } |
160 | 162 |
(...skipping 13 matching lines...) Expand all Loading... |
174 window->pending_bounds_ = gfx::Rect(0, 0, width, height); | 176 window->pending_bounds_ = gfx::Rect(0, 0, width, height); |
175 window->pending_configure_serial_ = serial; | 177 window->pending_configure_serial_ = serial; |
176 } | 178 } |
177 | 179 |
178 // static | 180 // static |
179 void WaylandWindow::Close(void* data, xdg_surface* obj) { | 181 void WaylandWindow::Close(void* data, xdg_surface* obj) { |
180 NOTIMPLEMENTED(); | 182 NOTIMPLEMENTED(); |
181 } | 183 } |
182 | 184 |
183 } // namespace ui | 185 } // namespace ui |
OLD | NEW |