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

Side by Side Diff: ui/wayland/wayland_input_device.cc

Issue 8378005: wayland: define base:NativeEvent for Wayland (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback. Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ui/wayland/wayland.gyp ('k') | ui/wayland/wayland_widget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/wayland/wayland_input_device.h" 5 #include "ui/wayland/wayland_input_device.h"
6 6
7 #include <X11/extensions/XKBcommon.h> 7 #include <X11/extensions/XKBcommon.h>
8 #include <wayland-client.h> 8 #include <wayland-client.h>
9 9
10 #include "ui/wayland/events/wayland_event.h" 10 #include "base/wayland/wayland_event.h"
11 #include "ui/wayland/wayland_widget.h" 11 #include "ui/wayland/wayland_widget.h"
12 #include "ui/wayland/wayland_window.h" 12 #include "ui/wayland/wayland_window.h"
13 13
14 using namespace base::wayland;
15
14 namespace ui { 16 namespace ui {
15 17
16 WaylandInputDevice::WaylandInputDevice( 18 WaylandInputDevice::WaylandInputDevice(
17 wl_display* display, 19 wl_display* display,
18 uint32_t id) 20 uint32_t id)
19 : input_device_(static_cast<wl_input_device*>( 21 : input_device_(static_cast<wl_input_device*>(
20 wl_display_bind(display, id, &wl_input_device_interface))), 22 wl_display_bind(display, id, &wl_input_device_interface))),
21 pointer_focus_(NULL), 23 pointer_focus_(NULL),
22 keyboard_focus_(NULL), 24 keyboard_focus_(NULL),
23 keyboard_modifiers_(0) { 25 keyboard_modifiers_(0) {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 // If we have a surface, then a window gains focus 205 // If we have a surface, then a window gains focus
204 if (surface) { 206 if (surface) {
205 event.keyboard_focus.state = 1; 207 event.keyboard_focus.state = 1;
206 window = static_cast<WaylandWindow*>(wl_surface_get_user_data(surface)); 208 window = static_cast<WaylandWindow*>(wl_surface_get_user_data(surface));
207 device->keyboard_focus_ = window; 209 device->keyboard_focus_ = window;
208 window->widget()->OnKeyboardFocus(event); 210 window->widget()->OnKeyboardFocus(event);
209 } 211 }
210 } 212 }
211 213
212 } // namespace ui 214 } // namespace ui
OLDNEW
« no previous file with comments | « ui/wayland/wayland.gyp ('k') | ui/wayland/wayland_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698