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

Side by Side Diff: ui/events/x/events_x.cc

Issue 2648583003: Handle floating point coordinates from ozone to exosphere (Closed)
Patch Set: fixed wayland unittest Created 3 years, 11 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/events/win/events_win.cc ('k') | ui/events/x/events_x_unittest.cc » ('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) 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/events/event_utils.h" 5 #include "ui/events/event_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 #include <X11/extensions/XInput.h> 9 #include <X11/extensions/XInput.h>
10 #include <X11/extensions/XInput2.h> 10 #include <X11/extensions/XInput2.h>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 base::TimeTicks EventTimeFromNative(const base::NativeEvent& native_event) { 87 base::TimeTicks EventTimeFromNative(const base::NativeEvent& native_event) {
88 base::TimeTicks timestamp = EventTimeFromXEvent(*native_event); 88 base::TimeTicks timestamp = EventTimeFromXEvent(*native_event);
89 ValidateEventTimeClock(&timestamp); 89 ValidateEventTimeClock(&timestamp);
90 return timestamp; 90 return timestamp;
91 } 91 }
92 92
93 gfx::Point EventLocationFromNative(const base::NativeEvent& native_event) { 93 gfx::Point EventLocationFromNative(const base::NativeEvent& native_event) {
94 return EventLocationFromXEvent(*native_event); 94 return EventLocationFromXEvent(*native_event);
95 } 95 }
96 96
97 gfx::PointF EventLocationFromNativeF(const base::NativeEvent& native_event) {
98 return gfx::PointF(EventLocationFromNative(native_event));
99 }
100
97 gfx::Point EventSystemLocationFromNative( 101 gfx::Point EventSystemLocationFromNative(
98 const base::NativeEvent& native_event) { 102 const base::NativeEvent& native_event) {
99 return EventSystemLocationFromXEvent(*native_event); 103 return EventSystemLocationFromXEvent(*native_event);
100 } 104 }
101 105
102 int EventButtonFromNative(const base::NativeEvent& native_event) { 106 int EventButtonFromNative(const base::NativeEvent& native_event) {
103 return EventButtonFromXEvent(*native_event); 107 return EventButtonFromXEvent(*native_event);
104 } 108 }
105 109
106 KeyboardCode KeyboardCodeFromNative(const base::NativeEvent& native_event) { 110 KeyboardCode KeyboardCodeFromNative(const base::NativeEvent& native_event) {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 xievent->detail = 232 xievent->detail =
229 UpdateX11EventButton(event->changed_button_flags(), xievent->detail); 233 UpdateX11EventButton(event->changed_button_flags(), xievent->detail);
230 break; 234 break;
231 } 235 }
232 default: 236 default:
233 break; 237 break;
234 } 238 }
235 } 239 }
236 240
237 } // namespace ui 241 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/win/events_win.cc ('k') | ui/events/x/events_x_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698