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

Side by Side Diff: ui/ozone/platform/wayland/wayland_window.cc

Issue 1841083003: ozone/platform/wayland: Implement keyboard handling Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « ui/ozone/platform/wayland/wayland_window.h ('k') | 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 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
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
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
OLDNEW
« no previous file with comments | « ui/ozone/platform/wayland/wayland_window.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698