Merge lp:~brandontschaefer/mir/msg-auth-code-field-added into lp:mir
- msg-auth-code-field-added
- Merge into development-branch
Status: | Merged |
---|---|
Approved by: | Cemil Azizoglu |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2867 |
Proposed branch: | lp:~brandontschaefer/mir/msg-auth-code-field-added |
Merge into: | lp:mir |
Diff against target: |
1436 lines (+179/-102) 36 files modified
3rd_party/android-input/android/frameworks/base/include/androidfw/Input.h (+8/-0) 3rd_party/android-input/android/frameworks/base/include/androidfw/InputTransport.h (+4/-0) 3rd_party/android-input/android/frameworks/base/services/input/Input.cpp (+6/-0) 3rd_party/android-input/android/frameworks/base/services/input/InputListener.cpp (+11/-9) 3rd_party/android-input/android/frameworks/base/services/input/InputListener.h (+8/-6) 3rd_party/android-input/android/frameworks/base/services/input/InputReader.cpp (+17/-17) 3rd_party/android-input/android/frameworks/base/services/input/InputTransport.cpp (+11/-5) 3rd_party/android-input/android/frameworks/base/services/input/KeyCharacterMap.cpp (+1/-1) include/client/mir/events/event_builders.h (+4/-4) src/client/events/event_builders.cpp (+8/-5) src/client/input/android/android_input_lexicon.cpp (+3/-0) src/include/common/mir/events/event_private.h (+2/-0) src/platforms/mesa/server/x11/input/dispatchable.cpp (+3/-0) src/server/input/android/input_sender.cpp (+2/-0) src/server/input/android/input_translator.cpp (+3/-0) src/server/input/surface_input_dispatcher.cpp (+1/-0) src/server/input/validator.cpp (+1/-1) tests/acceptance-tests/test_client_input.cpp (+1/-1) tests/acceptance-tests/test_surface_modifications.cpp (+4/-2) tests/acceptance-tests/test_surface_placement.cpp (+2/-1) tests/acceptance-tests/test_surface_specification.cpp (+4/-2) tests/mir_test_framework/fake_input_device_impl.cpp (+8/-2) tests/unit-tests/client/input/test_android_input_receiver.cpp (+2/-0) tests/unit-tests/client/input/test_xkb_mapper.cpp (+2/-1) tests/unit-tests/frontend/test_event_sender.cpp (+2/-1) tests/unit-tests/input/android/test_android_input_lexicon.cpp (+6/-3) tests/unit-tests/input/android/test_android_input_sender.cpp (+3/-3) tests/unit-tests/input/android/test_input_translator.cpp (+15/-10) tests/unit-tests/input/test_default_input_device_hub.cpp (+10/-6) tests/unit-tests/input/test_event_builders.cpp (+7/-6) tests/unit-tests/input/test_event_filter_chain_dispatcher.cpp (+1/-1) tests/unit-tests/input/test_key_repeat_dispatcher.cpp (+2/-2) tests/unit-tests/input/test_surface_input_dispatcher.cpp (+10/-10) tests/unit-tests/input/test_validator.cpp (+1/-1) tests/unit-tests/scene/test_abstract_shell.cpp (+4/-0) tests/unit-tests/scene/test_surface.cpp (+2/-2) |
To merge this branch: | bzr merge lp:~brandontschaefer/mir/msg-auth-code-field-added |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Chris Halse Rogers | Needs Fixing | ||
Alexandros Frantzis (community) | Approve | ||
Review via email: mp+268383@code.launchpad.net |
Commit message
Add a mac field for key/touch/pointer events.
Description of the change
The main code churn for this branch:
https:/
Add a mac field for key/touch/pointer events.
PS Jenkins bot (ps-jenkins) wrote : | # |
Alexandros Frantzis (afrantzis) wrote : | # |
Looks good.
Chris Halse Rogers (raof) wrote : | # |
Inline comment needs fixing; other than that, looks good.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2849
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) : | # |
Preview Diff
1 | === modified file '3rd_party/android-input/android/frameworks/base/include/androidfw/Input.h' |
2 | --- 3rd_party/android-input/android/frameworks/base/include/androidfw/Input.h 2015-04-28 07:54:10 +0000 |
3 | +++ 3rd_party/android-input/android/frameworks/base/include/androidfw/Input.h 2015-08-20 16:14:01 +0000 |
4 | @@ -276,6 +276,8 @@ |
5 | |
6 | inline int32_t getRepeatCount() const { return mRepeatCount; } |
7 | |
8 | + inline uint64_t getMac() const { return mMac; } |
9 | + |
10 | inline std::chrono::nanoseconds getDownTime() const { return mDownTime; } |
11 | |
12 | inline std::chrono::nanoseconds getEventTime() const { return mEventTime; } |
13 | @@ -297,6 +299,7 @@ |
14 | int32_t scanCode, |
15 | int32_t metaState, |
16 | int32_t repeatCount, |
17 | + uint64_t mac, |
18 | std::chrono::nanoseconds downTime, |
19 | std::chrono::nanoseconds eventTime); |
20 | void initialize(const KeyEvent& from); |
21 | @@ -308,6 +311,7 @@ |
22 | int32_t mScanCode; |
23 | int32_t mMetaState; |
24 | int32_t mRepeatCount; |
25 | + uint64_t mMac; |
26 | std::chrono::nanoseconds mDownTime; |
27 | std::chrono::nanoseconds mEventTime; |
28 | }; |
29 | @@ -354,6 +358,8 @@ |
30 | |
31 | inline float getYPrecision() const { return mYPrecision; } |
32 | |
33 | + inline uint64_t getMac() const { return mMac; } |
34 | + |
35 | inline std::chrono::nanoseconds getDownTime() const { return mDownTime; } |
36 | |
37 | inline void setDownTime(std::chrono::nanoseconds downTime) { mDownTime = downTime; } |
38 | @@ -507,6 +513,7 @@ |
39 | float yOffset, |
40 | float xPrecision, |
41 | float yPrecision, |
42 | + uint64_t mac, |
43 | std::chrono::nanoseconds downTime, |
44 | std::chrono::nanoseconds eventTime, |
45 | size_t pointerCount, |
46 | @@ -554,6 +561,7 @@ |
47 | float mYOffset; |
48 | float mXPrecision; |
49 | float mYPrecision; |
50 | + uint64_t mMac; |
51 | std::chrono::nanoseconds mDownTime; |
52 | Vector<PointerProperties> mPointerProperties; |
53 | Vector<std::chrono::nanoseconds> mSampleEventTimes; |
54 | |
55 | === modified file '3rd_party/android-input/android/frameworks/base/include/androidfw/InputTransport.h' |
56 | --- 3rd_party/android-input/android/frameworks/base/include/androidfw/InputTransport.h 2015-04-28 07:54:10 +0000 |
57 | +++ 3rd_party/android-input/android/frameworks/base/include/androidfw/InputTransport.h 2015-08-20 16:14:01 +0000 |
58 | @@ -62,6 +62,7 @@ |
59 | struct Key { |
60 | uint32_t seq; |
61 | int64_t eventTime; |
62 | + uint64_t mac; |
63 | int32_t deviceId; |
64 | int32_t source; |
65 | int32_t action; |
66 | @@ -80,6 +81,7 @@ |
67 | struct Motion { |
68 | uint32_t seq; |
69 | int64_t eventTime; |
70 | + uint64_t mac; |
71 | int32_t deviceId; |
72 | int32_t source; |
73 | int32_t action; |
74 | @@ -210,6 +212,7 @@ |
75 | int32_t scanCode, |
76 | int32_t metaState, |
77 | int32_t repeatCount, |
78 | + uint64_t mac, |
79 | std::chrono::nanoseconds downTime, |
80 | std::chrono::nanoseconds eventTime); |
81 | |
82 | @@ -234,6 +237,7 @@ |
83 | float yOffset, |
84 | float xPrecision, |
85 | float yPrecision, |
86 | + uint64_t mac, |
87 | std::chrono::nanoseconds downTime, |
88 | std::chrono::nanoseconds eventTime, |
89 | size_t pointerCount, |
90 | |
91 | === modified file '3rd_party/android-input/android/frameworks/base/services/input/Input.cpp' |
92 | --- 3rd_party/android-input/android/frameworks/base/services/input/Input.cpp 2015-08-18 01:35:15 +0000 |
93 | +++ 3rd_party/android-input/android/frameworks/base/services/input/Input.cpp 2015-08-20 16:14:01 +0000 |
94 | @@ -127,6 +127,7 @@ |
95 | int32_t scanCode, |
96 | int32_t metaState, |
97 | int32_t repeatCount, |
98 | + uint64_t mac, |
99 | std::chrono::nanoseconds downTime, |
100 | std::chrono::nanoseconds eventTime) { |
101 | InputEvent::initialize(deviceId, source); |
102 | @@ -136,6 +137,7 @@ |
103 | mScanCode = scanCode; |
104 | mMetaState = metaState; |
105 | mRepeatCount = repeatCount; |
106 | + mMac = mac; |
107 | mDownTime = downTime; |
108 | mEventTime = eventTime; |
109 | } |
110 | @@ -148,6 +150,7 @@ |
111 | mScanCode = from.mScanCode; |
112 | mMetaState = from.mMetaState; |
113 | mRepeatCount = from.mRepeatCount; |
114 | + mMac = from.mMac; |
115 | mDownTime = from.mDownTime; |
116 | mEventTime = from.mEventTime; |
117 | } |
118 | @@ -291,6 +294,7 @@ |
119 | float yOffset, |
120 | float xPrecision, |
121 | float yPrecision, |
122 | + uint64_t mac, |
123 | std::chrono::nanoseconds downTime, |
124 | std::chrono::nanoseconds eventTime, |
125 | size_t pointerCount, |
126 | @@ -306,6 +310,7 @@ |
127 | mYOffset = yOffset; |
128 | mXPrecision = xPrecision; |
129 | mYPrecision = yPrecision; |
130 | + mMac = mac; |
131 | mDownTime = downTime; |
132 | mPointerProperties.clear(); |
133 | mPointerProperties.appendArray(pointerProperties, pointerCount); |
134 | @@ -325,6 +330,7 @@ |
135 | mYOffset = other->mYOffset; |
136 | mXPrecision = other->mXPrecision; |
137 | mYPrecision = other->mYPrecision; |
138 | + mMac = other->mMac; |
139 | mDownTime = other->mDownTime; |
140 | mPointerProperties = other->mPointerProperties; |
141 | |
142 | |
143 | === modified file '3rd_party/android-input/android/frameworks/base/services/input/InputListener.cpp' |
144 | --- 3rd_party/android-input/android/frameworks/base/services/input/InputListener.cpp 2015-04-28 07:54:10 +0000 |
145 | +++ 3rd_party/android-input/android/frameworks/base/services/input/InputListener.cpp 2015-08-20 16:14:01 +0000 |
146 | @@ -42,8 +42,8 @@ |
147 | |
148 | // --- NotifyKeyArgs --- |
149 | |
150 | -NotifyKeyArgs::NotifyKeyArgs(std::chrono::nanoseconds eventTime, int32_t deviceId, uint32_t source, |
151 | - uint32_t policyFlags, |
152 | +NotifyKeyArgs::NotifyKeyArgs(std::chrono::nanoseconds eventTime, uint64_t mac, |
153 | + int32_t deviceId, uint32_t source, uint32_t policyFlags, |
154 | int32_t action, int32_t flags, int32_t keyCode, int32_t scanCode, |
155 | int32_t metaState, std::chrono::nanoseconds downTime) : |
156 | eventTime(eventTime), deviceId(deviceId), source(source), policyFlags(policyFlags), |
157 | @@ -52,7 +52,8 @@ |
158 | } |
159 | |
160 | NotifyKeyArgs::NotifyKeyArgs(const NotifyKeyArgs& other) : |
161 | - eventTime(other.eventTime), deviceId(other.deviceId), source(other.source), |
162 | + eventTime(other.eventTime), mac(other.mac), |
163 | + deviceId(other.deviceId), source(other.source), |
164 | policyFlags(other.policyFlags), |
165 | action(other.action), flags(other.flags), |
166 | keyCode(other.keyCode), scanCode(other.scanCode), |
167 | @@ -66,15 +67,15 @@ |
168 | |
169 | // --- NotifyMotionArgs --- |
170 | |
171 | -NotifyMotionArgs::NotifyMotionArgs(std::chrono::nanoseconds eventTime, int32_t deviceId, uint32_t source, |
172 | - uint32_t policyFlags, |
173 | +NotifyMotionArgs::NotifyMotionArgs(std::chrono::nanoseconds eventTime, uint64_t mac, |
174 | + int32_t deviceId, uint32_t source, uint32_t policyFlags, |
175 | int32_t action, int32_t flags, int32_t metaState, int32_t buttonState, |
176 | int32_t edgeFlags, uint32_t pointerCount, |
177 | const PointerProperties* pointerProperties, const PointerCoords* pointerCoords, |
178 | float xPrecision, float yPrecision, std::chrono::nanoseconds downTime) : |
179 | - eventTime(eventTime), deviceId(deviceId), source(source), policyFlags(policyFlags), |
180 | - action(action), flags(flags), metaState(metaState), buttonState(buttonState), |
181 | - edgeFlags(edgeFlags), pointerCount(pointerCount), |
182 | + eventTime(eventTime), mac(mac), deviceId(deviceId), source(source), |
183 | + policyFlags(policyFlags), action(action), flags(flags), metaState(metaState), |
184 | + buttonState(buttonState), edgeFlags(edgeFlags), pointerCount(pointerCount), |
185 | xPrecision(xPrecision), yPrecision(yPrecision), downTime(downTime) { |
186 | for (uint32_t i = 0; i < pointerCount; i++) { |
187 | this->pointerProperties[i].copyFrom(pointerProperties[i]); |
188 | @@ -83,7 +84,8 @@ |
189 | } |
190 | |
191 | NotifyMotionArgs::NotifyMotionArgs(const NotifyMotionArgs& other) : |
192 | - eventTime(other.eventTime), deviceId(other.deviceId), source(other.source), |
193 | + eventTime(other.eventTime), mac(other.mac), |
194 | + deviceId(other.deviceId), source(other.source), |
195 | policyFlags(other.policyFlags), |
196 | action(other.action), flags(other.flags), |
197 | metaState(other.metaState), buttonState(other.buttonState), |
198 | |
199 | === modified file '3rd_party/android-input/android/frameworks/base/services/input/InputListener.h' |
200 | --- 3rd_party/android-input/android/frameworks/base/services/input/InputListener.h 2015-04-28 07:54:10 +0000 |
201 | +++ 3rd_party/android-input/android/frameworks/base/services/input/InputListener.h 2015-08-20 16:14:01 +0000 |
202 | @@ -54,6 +54,7 @@ |
203 | /* Describes a key event. */ |
204 | struct NotifyKeyArgs : public NotifyArgs { |
205 | std::chrono::nanoseconds eventTime; |
206 | + uint64_t mac; |
207 | int32_t deviceId; |
208 | uint32_t source; |
209 | uint32_t policyFlags; |
210 | @@ -66,9 +67,9 @@ |
211 | |
212 | inline NotifyKeyArgs() { } |
213 | |
214 | - NotifyKeyArgs(std::chrono::nanoseconds eventTime, int32_t deviceId, uint32_t source, uint32_t policyFlags, |
215 | - int32_t action, int32_t flags, int32_t keyCode, int32_t scanCode, |
216 | - int32_t metaState, std::chrono::nanoseconds downTime); |
217 | + NotifyKeyArgs(std::chrono::nanoseconds eventTime, uint64_t mac, int32_t deviceId, uint32_t source, |
218 | + uint32_t policyFlags, int32_t action, int32_t flags, int32_t keyCode, |
219 | + int32_t scanCode, int32_t metaState, std::chrono::nanoseconds downTime); |
220 | |
221 | NotifyKeyArgs(const NotifyKeyArgs& other); |
222 | |
223 | @@ -81,6 +82,7 @@ |
224 | /* Describes a motion event. */ |
225 | struct NotifyMotionArgs : public NotifyArgs { |
226 | std::chrono::nanoseconds eventTime; |
227 | + uint64_t mac; |
228 | int32_t deviceId; |
229 | uint32_t source; |
230 | uint32_t policyFlags; |
231 | @@ -98,9 +100,9 @@ |
232 | |
233 | inline NotifyMotionArgs() { } |
234 | |
235 | - NotifyMotionArgs(std::chrono::nanoseconds eventTime, int32_t deviceId, uint32_t source, uint32_t policyFlags, |
236 | - int32_t action, int32_t flags, int32_t metaState, int32_t buttonState, |
237 | - int32_t edgeFlags, uint32_t pointerCount, |
238 | + NotifyMotionArgs(std::chrono::nanoseconds eventTime, uint64_t mac, int32_t deviceId, uint32_t source, |
239 | + uint32_t policyFlags, int32_t action, int32_t flags, int32_t metaState, |
240 | + int32_t buttonState, int32_t edgeFlags, uint32_t pointerCount, |
241 | const PointerProperties* pointerProperties, const PointerCoords* pointerCoords, |
242 | float xPrecision, float yPrecision, std::chrono::nanoseconds downTime); |
243 | |
244 | |
245 | === modified file '3rd_party/android-input/android/frameworks/base/services/input/InputReader.cpp' |
246 | --- 3rd_party/android-input/android/frameworks/base/services/input/InputReader.cpp 2015-08-19 02:03:51 +0000 |
247 | +++ 3rd_party/android-input/android/frameworks/base/services/input/InputReader.cpp 2015-08-20 16:14:01 +0000 |
248 | @@ -186,7 +186,7 @@ |
249 | || (action == AKEY_EVENT_ACTION_UP |
250 | && (lastButtonState & buttonState) |
251 | && !(currentButtonState & buttonState))) { |
252 | - NotifyKeyArgs args(when, deviceId, source, policyFlags, |
253 | + NotifyKeyArgs args(when, 0, deviceId, source, policyFlags, |
254 | action, 0, keyCode, 0, context->getGlobalMetaState(), when); |
255 | context->getListener()->notifyKey(&args); |
256 | } |
257 | @@ -2170,7 +2170,7 @@ |
258 | getContext()->fadePointer(); |
259 | } |
260 | |
261 | - NotifyKeyArgs args(when, getDeviceId(), mSource, policyFlags, |
262 | + NotifyKeyArgs args(when, 0, getDeviceId(), mSource, policyFlags, |
263 | down ? AKEY_EVENT_ACTION_DOWN : AKEY_EVENT_ACTION_UP, |
264 | AKEY_EVENT_FLAG_FROM_SYSTEM, keyCode, scanCode, newMetaState, downTime); |
265 | getListener()->notifyKey(&args); |
266 | @@ -2512,7 +2512,7 @@ |
267 | motionEventAction = AMOTION_EVENT_ACTION_HOVER_MOVE; |
268 | } |
269 | |
270 | - NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags, |
271 | + NotifyMotionArgs args(when, 0, getDeviceId(), mSource, policyFlags, |
272 | motionEventAction, 0, metaState, currentButtonState, 0, |
273 | 1, &pointerProperties, &pointerCoords, mXPrecision, mYPrecision, downTime); |
274 | getListener()->notifyMotion(&args); |
275 | @@ -2520,7 +2520,7 @@ |
276 | // Send hover move after UP to tell the application that the mouse is hovering now. |
277 | if (motionEventAction == AMOTION_EVENT_ACTION_UP |
278 | && mPointerController != NULL) { |
279 | - NotifyMotionArgs hoverArgs(when, getDeviceId(), mSource, policyFlags, |
280 | + NotifyMotionArgs hoverArgs(when, 0, getDeviceId(), mSource, policyFlags, |
281 | AMOTION_EVENT_ACTION_HOVER_MOVE, 0, |
282 | metaState, currentButtonState, AMOTION_EVENT_EDGE_FLAG_NONE, |
283 | 1, &pointerProperties, &pointerCoords, mXPrecision, mYPrecision, downTime); |
284 | @@ -2532,7 +2532,7 @@ |
285 | pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_VSCROLL, vscroll); |
286 | pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_HSCROLL, hscroll); |
287 | |
288 | - NotifyMotionArgs scrollArgs(when, getDeviceId(), mSource, policyFlags, |
289 | + NotifyMotionArgs scrollArgs(when, 0, getDeviceId(), mSource, policyFlags, |
290 | AMOTION_EVENT_ACTION_SCROLL, 0, metaState, currentButtonState, |
291 | AMOTION_EVENT_EDGE_FLAG_NONE, |
292 | 1, &pointerProperties, &pointerCoords, mXPrecision, mYPrecision, downTime); |
293 | @@ -3813,7 +3813,7 @@ |
294 | int32_t metaState = mContext->getGlobalMetaState(); |
295 | policyFlags |= POLICY_FLAG_VIRTUAL; |
296 | |
297 | - NotifyKeyArgs args(when, getDeviceId(), AINPUT_SOURCE_KEYBOARD, policyFlags, |
298 | + NotifyKeyArgs args(when, 0, getDeviceId(), AINPUT_SOURCE_KEYBOARD, policyFlags, |
299 | keyEventAction, keyEventFlags, keyCode, scanCode, metaState, downTime); |
300 | getListener()->notifyKey(&args); |
301 | } |
302 | @@ -4365,7 +4365,7 @@ |
303 | pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_X, x); |
304 | pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_Y, y); |
305 | |
306 | - NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags, |
307 | + NotifyMotionArgs args(when, 0, getDeviceId(), mSource, policyFlags, |
308 | AMOTION_EVENT_ACTION_HOVER_MOVE, 0, |
309 | metaState, buttonState, AMOTION_EVENT_EDGE_FLAG_NONE, |
310 | 1, &pointerProperties, &pointerCoords, 0, 0, mPointerGesture.downTime); |
311 | @@ -5268,7 +5268,7 @@ |
312 | mPointerSimple.down = false; |
313 | |
314 | // Send up. |
315 | - NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags, |
316 | + NotifyMotionArgs args(when, 0,getDeviceId(), mSource, policyFlags, |
317 | AMOTION_EVENT_ACTION_UP, 0, metaState, mLastButtonState, 0, |
318 | 1, &mPointerSimple.lastProperties, &mPointerSimple.lastCoords, |
319 | mOrientedXPrecision, mOrientedYPrecision, |
320 | @@ -5280,7 +5280,7 @@ |
321 | mPointerSimple.hovering = false; |
322 | |
323 | // Send hover exit. |
324 | - NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags, |
325 | + NotifyMotionArgs args(when, 0, getDeviceId(), mSource, policyFlags, |
326 | AMOTION_EVENT_ACTION_HOVER_EXIT, 0, metaState, mLastButtonState, 0, |
327 | 1, &mPointerSimple.lastProperties, &mPointerSimple.lastCoords, |
328 | mOrientedXPrecision, mOrientedYPrecision, |
329 | @@ -5294,7 +5294,7 @@ |
330 | mPointerSimple.downTime = when; |
331 | |
332 | // Send down. |
333 | - NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags, |
334 | + NotifyMotionArgs args(when, 0, getDeviceId(), mSource, policyFlags, |
335 | AMOTION_EVENT_ACTION_DOWN, 0, metaState, mCurrentButtonState, 0, |
336 | 1, &mPointerSimple.currentProperties, &mPointerSimple.currentCoords, |
337 | mOrientedXPrecision, mOrientedYPrecision, |
338 | @@ -5303,7 +5303,7 @@ |
339 | } |
340 | |
341 | // Send move. |
342 | - NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags, |
343 | + NotifyMotionArgs args(when, 0, getDeviceId(), mSource, policyFlags, |
344 | AMOTION_EVENT_ACTION_MOVE, 0, metaState, mCurrentButtonState, 0, |
345 | 1, &mPointerSimple.currentProperties, &mPointerSimple.currentCoords, |
346 | mOrientedXPrecision, mOrientedYPrecision, |
347 | @@ -5316,7 +5316,7 @@ |
348 | mPointerSimple.hovering = true; |
349 | |
350 | // Send hover enter. |
351 | - NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags, |
352 | + NotifyMotionArgs args(when, 0, getDeviceId(), mSource, policyFlags, |
353 | AMOTION_EVENT_ACTION_HOVER_ENTER, 0, metaState, mCurrentButtonState, 0, |
354 | 1, &mPointerSimple.currentProperties, &mPointerSimple.currentCoords, |
355 | mOrientedXPrecision, mOrientedYPrecision, |
356 | @@ -5325,7 +5325,7 @@ |
357 | } |
358 | |
359 | // Send hover move. |
360 | - NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags, |
361 | + NotifyMotionArgs args(when, 0, getDeviceId(), mSource, policyFlags, |
362 | AMOTION_EVENT_ACTION_HOVER_MOVE, 0, metaState, mCurrentButtonState, 0, |
363 | 1, &mPointerSimple.currentProperties, &mPointerSimple.currentCoords, |
364 | mOrientedXPrecision, mOrientedYPrecision, |
365 | @@ -5345,7 +5345,7 @@ |
366 | pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_VSCROLL, vscroll); |
367 | pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_HSCROLL, hscroll); |
368 | |
369 | - NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags, |
370 | + NotifyMotionArgs args(when, 0, getDeviceId(), mSource, policyFlags, |
371 | AMOTION_EVENT_ACTION_SCROLL, 0, metaState, mCurrentButtonState, 0, |
372 | 1, &mPointerSimple.currentProperties, &pointerCoords, |
373 | mOrientedXPrecision, mOrientedYPrecision, |
374 | @@ -5404,7 +5404,7 @@ |
375 | } |
376 | } |
377 | |
378 | - NotifyMotionArgs args(when, getDeviceId(), source, policyFlags, |
379 | + NotifyMotionArgs args(when, 0, getDeviceId(), source, policyFlags, |
380 | action, flags, metaState, buttonState, edgeFlags, |
381 | pointerCount, pointerProperties, pointerCoords, xPrecision, yPrecision, downTime); |
382 | getListener()->notifyMotion(&args); |
383 | @@ -5455,7 +5455,7 @@ |
384 | action = (action & AMOTION_EVENT_ACTION_POINTER_INDEX_MASK) | actionPart; |
385 | } |
386 | |
387 | - NotifyMotionArgs args(when, getDeviceId(), source, policyFlags, |
388 | + NotifyMotionArgs args(when, 0, getDeviceId(), source, policyFlags, |
389 | action, flags, metaState, buttonState, edgeFlags, |
390 | pointerCount, pointerProperties, pointerCoords, xPrecision, yPrecision, downTime); |
391 | getListener()->notifyMotion(&args); |
392 | @@ -6283,7 +6283,7 @@ |
393 | // TODO: Use the input device configuration to control this behavior more finely. |
394 | uint32_t policyFlags = 0; |
395 | |
396 | - NotifyMotionArgs args(when, getDeviceId(), AINPUT_SOURCE_JOYSTICK, policyFlags, |
397 | + NotifyMotionArgs args(when, 0, getDeviceId(), AINPUT_SOURCE_JOYSTICK, policyFlags, |
398 | AMOTION_EVENT_ACTION_MOVE, 0, metaState, buttonState, AMOTION_EVENT_EDGE_FLAG_NONE, |
399 | 1, &pointerProperties, &pointerCoords, 0, 0, std::chrono::nanoseconds(0)); |
400 | getListener()->notifyMotion(&args); |
401 | |
402 | === modified file '3rd_party/android-input/android/frameworks/base/services/input/InputTransport.cpp' |
403 | --- 3rd_party/android-input/android/frameworks/base/services/input/InputTransport.cpp 2015-07-27 07:24:50 +0000 |
404 | +++ 3rd_party/android-input/android/frameworks/base/services/input/InputTransport.cpp 2015-08-20 16:14:01 +0000 |
405 | @@ -240,15 +240,16 @@ |
406 | int32_t scanCode, |
407 | int32_t metaState, |
408 | int32_t repeatCount, |
409 | + uint64_t mac, |
410 | std::chrono::nanoseconds downTime, |
411 | std::chrono::nanoseconds eventTime) { |
412 | #if DEBUG_TRANSPORT_ACTIONS |
413 | ALOGD("channel '%s' publisher ~ publishKeyEvent: seq=%u, deviceId=%d, source=0x%x, " |
414 | "action=0x%x, flags=0x%x, keyCode=%d, scanCode=%d, metaState=0x%x, repeatCount=%d," |
415 | - "downTime=%lld, eventTime=%lld", |
416 | + "mac=%lu, downTime=%lld, eventTime=%lld", |
417 | c_str(mChannel->getName()), seq, |
418 | deviceId, source, action, flags, keyCode, scanCode, metaState, repeatCount, |
419 | - downTime, eventTime); |
420 | + mac, downTime, eventTime); |
421 | #endif |
422 | |
423 | if (!seq) { |
424 | @@ -267,6 +268,7 @@ |
425 | msg.body.key.scanCode = scanCode; |
426 | msg.body.key.metaState = metaState; |
427 | msg.body.key.repeatCount = repeatCount; |
428 | + msg.body.key.mac = mac; |
429 | msg.body.key.downTime = downTime.count(); |
430 | msg.body.key.eventTime = eventTime.count(); |
431 | return mChannel->sendMessage(&msg); |
432 | @@ -285,6 +287,7 @@ |
433 | float yOffset, |
434 | float xPrecision, |
435 | float yPrecision, |
436 | + uint64_t mac, |
437 | std::chrono::nanoseconds downTime, |
438 | std::chrono::nanoseconds eventTime, |
439 | size_t pointerCount, |
440 | @@ -294,11 +297,11 @@ |
441 | ALOGD("channel '%s' publisher ~ publishMotionEvent: seq=%u, deviceId=%d, source=0x%x, " |
442 | "action=0x%x, flags=0x%x, edgeFlags=0x%x, metaState=0x%x, buttonState=0x%x, " |
443 | "xOffset=%f, yOffset=%f, " |
444 | - "xPrecision=%f, yPrecision=%f, downTime=%lld, eventTime=%lld, " |
445 | - "pointerCount=%d", |
446 | + "xPrecision=%f, yPrecision=%f, mac=%lu, " |
447 | + "downTime=%lld, eventTime=%lld, pointerCount=%d", |
448 | c_str(mChannel->getName()), seq, |
449 | deviceId, source, action, flags, edgeFlags, metaState, buttonState, |
450 | - xOffset, yOffset, xPrecision, yPrecision, downTime, eventTime, pointerCount); |
451 | + xOffset, yOffset, xPrecision, yPrecision, mac, downTime, eventTime, pointerCount); |
452 | #endif |
453 | |
454 | if (!seq) { |
455 | @@ -326,6 +329,7 @@ |
456 | msg.body.motion.yOffset = yOffset; |
457 | msg.body.motion.xPrecision = xPrecision; |
458 | msg.body.motion.yPrecision = yPrecision; |
459 | + msg.body.motion.mac = mac; |
460 | msg.body.motion.downTime = downTime.count(); |
461 | msg.body.motion.eventTime = eventTime.count(); |
462 | msg.body.motion.pointerCount = pointerCount; |
463 | @@ -882,6 +886,7 @@ |
464 | msg->body.key.scanCode, |
465 | msg->body.key.metaState, |
466 | msg->body.key.repeatCount, |
467 | + msg->body.key.mac, |
468 | std::chrono::nanoseconds(msg->body.key.downTime), |
469 | std::chrono::nanoseconds(msg->body.key.eventTime)); |
470 | } |
471 | @@ -907,6 +912,7 @@ |
472 | msg->body.motion.yOffset, |
473 | msg->body.motion.xPrecision, |
474 | msg->body.motion.yPrecision, |
475 | + msg->body.motion.mac, |
476 | std::chrono::nanoseconds(msg->body.motion.downTime), |
477 | std::chrono::nanoseconds(msg->body.motion.eventTime), |
478 | pointerCount, |
479 | |
480 | === modified file '3rd_party/android-input/android/frameworks/base/services/input/KeyCharacterMap.cpp' |
481 | --- 3rd_party/android-input/android/frameworks/base/services/input/KeyCharacterMap.cpp 2015-04-28 07:54:10 +0000 |
482 | +++ 3rd_party/android-input/android/frameworks/base/services/input/KeyCharacterMap.cpp 2015-08-20 16:14:01 +0000 |
483 | @@ -444,7 +444,7 @@ |
484 | KeyEvent& event = outEvents.editTop(); |
485 | event.initialize(deviceId, AINPUT_SOURCE_KEYBOARD, |
486 | down ? AKEY_EVENT_ACTION_DOWN : AKEY_EVENT_ACTION_UP, |
487 | - 0, keyCode, 0, metaState, 0, time, time); |
488 | + 0, keyCode, 0, metaState, 0, 0, time, time); |
489 | } |
490 | |
491 | void KeyCharacterMap::addMetaKeys(Vector<KeyEvent>& outEvents, |
492 | |
493 | === modified file 'include/client/mir/events/event_builders.h' |
494 | --- include/client/mir/events/event_builders.h 2015-07-25 08:10:48 +0000 |
495 | +++ include/client/mir/events/event_builders.h 2015-08-20 16:14:01 +0000 |
496 | @@ -49,12 +49,12 @@ |
497 | |
498 | // Key event |
499 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, |
500 | - MirKeyboardAction action, xkb_keysym_t key_code, |
501 | + uint64_t mac, MirKeyboardAction action, xkb_keysym_t key_code, |
502 | int scan_code, MirInputEventModifiers modifiers); |
503 | |
504 | // Touch event |
505 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, |
506 | - MirInputEventModifiers modifiers); |
507 | + uint64_t mac, MirInputEventModifiers modifiers); |
508 | void add_touch(MirEvent &event, MirTouchId touch_id, MirTouchAction action, |
509 | MirTouchTooltype tooltype, float x_axis_value, float y_axis_value, |
510 | float pressure_value, float touch_major_value, float touch_minor_value, float size_value); |
511 | @@ -62,13 +62,13 @@ |
512 | // Pointer event |
513 | // Deprecated version without relative axis |
514 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, |
515 | - MirInputEventModifiers modifiers, MirPointerAction action, |
516 | + uint64_t mac, MirInputEventModifiers modifiers, MirPointerAction action, |
517 | MirPointerButtons buttons_pressed, |
518 | float x_axis_value, float y_axis_value, |
519 | float hscroll_value, float vscroll_value); |
520 | |
521 | EventUPtr make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, |
522 | - MirInputEventModifiers modifiers, MirPointerAction action, |
523 | + uint64_t mac, MirInputEventModifiers modifiers, MirPointerAction action, |
524 | MirPointerButtons buttons_pressed, |
525 | float x_axis_value, float y_axis_value, |
526 | float hscroll_value, float vscroll_value, |
527 | |
528 | === modified file 'src/client/events/event_builders.cpp' |
529 | --- src/client/events/event_builders.cpp 2015-07-25 08:10:48 +0000 |
530 | +++ src/client/events/event_builders.cpp 2015-08-20 16:14:01 +0000 |
531 | @@ -127,7 +127,7 @@ |
532 | } |
533 | |
534 | mir::EventUPtr mev::make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, |
535 | - MirKeyboardAction action, xkb_keysym_t key_code, |
536 | + uint64_t mac, MirKeyboardAction action, xkb_keysym_t key_code, |
537 | int scan_code, MirInputEventModifiers modifiers) |
538 | { |
539 | auto e = new MirEvent; |
540 | @@ -138,6 +138,7 @@ |
541 | kev.device_id = device_id; |
542 | kev.source_id = AINPUT_SOURCE_KEYBOARD; |
543 | kev.event_time = timestamp; |
544 | + kev.mac = mac; |
545 | kev.action = action; |
546 | kev.key_code = key_code; |
547 | kev.scan_code = scan_code; |
548 | @@ -147,7 +148,7 @@ |
549 | } |
550 | |
551 | mir::EventUPtr mev::make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, |
552 | - MirInputEventModifiers modifiers) |
553 | + uint64_t mac, MirInputEventModifiers modifiers) |
554 | { |
555 | auto e = new MirEvent; |
556 | memset(e, 0, sizeof (MirEvent)); |
557 | @@ -156,6 +157,7 @@ |
558 | auto& mev = e->motion; |
559 | mev.device_id = device_id; |
560 | mev.event_time = timestamp; |
561 | + mev.mac = mac; |
562 | mev.modifiers = modifiers; |
563 | mev.source_id = AINPUT_SOURCE_TOUCHSCREEN; |
564 | |
565 | @@ -180,7 +182,7 @@ |
566 | } |
567 | |
568 | mir::EventUPtr mev::make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, |
569 | - MirInputEventModifiers modifiers, MirPointerAction action, |
570 | + uint64_t mac, MirInputEventModifiers modifiers, MirPointerAction action, |
571 | MirPointerButtons buttons_pressed, |
572 | float x_axis_value, float y_axis_value, |
573 | float hscroll_value, float vscroll_value, |
574 | @@ -193,6 +195,7 @@ |
575 | auto& mev = e->motion; |
576 | mev.device_id = device_id; |
577 | mev.event_time = timestamp; |
578 | + mev.mac = mac; |
579 | mev.modifiers = modifiers; |
580 | mev.source_id = AINPUT_SOURCE_MOUSE; |
581 | mev.buttons = buttons_pressed; |
582 | @@ -211,12 +214,12 @@ |
583 | } |
584 | |
585 | mir::EventUPtr mev::make_event(MirInputDeviceId device_id, std::chrono::nanoseconds timestamp, |
586 | - MirInputEventModifiers modifiers, MirPointerAction action, |
587 | + uint64_t mac, MirInputEventModifiers modifiers, MirPointerAction action, |
588 | MirPointerButtons buttons_pressed, |
589 | float x_axis_value, float y_axis_value, |
590 | float hscroll_value, float vscroll_value) |
591 | { |
592 | - return make_event(device_id, timestamp, modifiers, action, buttons_pressed, |
593 | + return make_event(device_id, timestamp, mac, modifiers, action, buttons_pressed, |
594 | x_axis_value, y_axis_value, hscroll_value, vscroll_value, 0, 0); |
595 | } |
596 | |
597 | |
598 | === modified file 'src/client/input/android/android_input_lexicon.cpp' |
599 | --- src/client/input/android/android_input_lexicon.cpp 2015-07-23 02:39:20 +0000 |
600 | +++ src/client/input/android/android_input_lexicon.cpp 2015-08-20 16:14:01 +0000 |
601 | @@ -40,6 +40,7 @@ |
602 | auto kev = static_cast<const droidinput::KeyEvent*>(android_event); |
603 | return mev::make_event(MirInputDeviceId(android_event->getDeviceId()), |
604 | kev->getEventTime(), |
605 | + kev->getMac(), |
606 | mia::mir_keyboard_action_from_android(kev->getAction(), kev->getRepeatCount()), |
607 | kev->getKeyCode(), |
608 | kev->getScanCode(), |
609 | @@ -52,6 +53,7 @@ |
610 | auto mev = static_cast<const droidinput::MotionEvent*>(android_event); |
611 | return mev::make_event(MirInputDeviceId(android_event->getDeviceId()), |
612 | mev->getEventTime(), |
613 | + mev->getMac(), |
614 | mia::mir_modifiers_from_android(mev->getMetaState()), |
615 | mia::mir_pointer_action_from_masked_android(mev->getAction() & AMOTION_EVENT_ACTION_MASK), |
616 | mia::mir_pointer_buttons_from_android(mev->getButtonState()), |
617 | @@ -66,6 +68,7 @@ |
618 | auto mev = static_cast<const droidinput::MotionEvent*>(android_event); |
619 | auto ev = mev::make_event(MirInputDeviceId(android_event->getDeviceId()), |
620 | mev->getEventTime(), |
621 | + mev->getMac(), |
622 | mia::mir_modifiers_from_android(mev->getMetaState())); |
623 | auto action = mev->getAction(); |
624 | size_t index_with_action = (action & AMOTION_EVENT_ACTION_POINTER_INDEX_MASK) >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT; |
625 | |
626 | === modified file 'src/include/common/mir/events/event_private.h' |
627 | --- src/include/common/mir/events/event_private.h 2015-07-23 02:39:20 +0000 |
628 | +++ src/include/common/mir/events/event_private.h 2015-08-20 16:14:01 +0000 |
629 | @@ -61,6 +61,7 @@ |
630 | int32_t scan_code; |
631 | |
632 | std::chrono::nanoseconds event_time; |
633 | + uint64_t mac; |
634 | } MirKeyEvent; |
635 | |
636 | typedef struct |
637 | @@ -98,6 +99,7 @@ |
638 | |
639 | MirPointerButtons buttons; |
640 | std::chrono::nanoseconds event_time; |
641 | + uint64_t mac; |
642 | |
643 | size_t pointer_count; |
644 | MirMotionPointer pointer_coordinates[MIR_INPUT_EVENT_MAX_POINTER_COUNT]; |
645 | |
646 | === modified file 'src/platforms/mesa/server/x11/input/dispatchable.cpp' |
647 | --- src/platforms/mesa/server/x11/input/dispatchable.cpp 2015-08-12 09:52:57 +0000 |
648 | +++ src/platforms/mesa/server/x11/input/dispatchable.cpp 2015-08-20 16:14:01 +0000 |
649 | @@ -116,6 +116,7 @@ |
650 | *mev::make_event( |
651 | MirInputDeviceId(0), |
652 | event_time, |
653 | + 0, /* mac */ |
654 | xkev.type == KeyPress ? |
655 | mir_keyboard_action_down : |
656 | mir_keyboard_action_up, |
657 | @@ -165,6 +166,7 @@ |
658 | *mev::make_event( |
659 | MirInputDeviceId(0), |
660 | event_time, |
661 | + 0, /* mac */ |
662 | modifiers, |
663 | xbev.type == ButtonPress ? |
664 | mir_pointer_action_button_down : |
665 | @@ -227,6 +229,7 @@ |
666 | *mev::make_event( |
667 | MirInputDeviceId(0), |
668 | event_time, |
669 | + 0, /* mac */ |
670 | modifiers, |
671 | mir_pointer_action_motion, |
672 | buttons_pressed, |
673 | |
674 | === modified file 'src/server/input/android/input_sender.cpp' |
675 | --- src/server/input/android/input_sender.cpp 2015-08-14 14:51:26 +0000 |
676 | +++ src/server/input/android/input_sender.cpp 2015-08-20 16:14:01 +0000 |
677 | @@ -252,6 +252,7 @@ |
678 | event.scan_code, |
679 | mia::android_modifiers_from_mir(event.modifiers), |
680 | repeat_count, |
681 | + event.mac, |
682 | event.event_time, |
683 | event.event_time |
684 | ); |
685 | @@ -297,6 +298,7 @@ |
686 | 0.0f, // event.x_offset, |
687 | 0.0f, // event.y_offset, |
688 | 0, 0, /* unused x/y precision */ |
689 | + event.mac, |
690 | event.event_time, |
691 | event.event_time, |
692 | event.pointer_count, |
693 | |
694 | === modified file 'src/server/input/android/input_translator.cpp' |
695 | --- src/server/input/android/input_translator.cpp 2015-08-07 05:46:34 +0000 |
696 | +++ src/server/input/android/input_translator.cpp 2015-08-20 16:14:01 +0000 |
697 | @@ -97,6 +97,7 @@ |
698 | auto mir_event = mev::make_event( |
699 | MirInputDeviceId(args->deviceId), |
700 | args->eventTime, |
701 | + 0, /* mac */ |
702 | mia::mir_keyboard_action_from_android(args->action, 0 /* repeat_count */), |
703 | args->keyCode, |
704 | args->scanCode, |
705 | @@ -115,6 +116,7 @@ |
706 | auto const& pc = args->pointerCoords[0]; |
707 | auto mir_event = mev::make_event(MirInputDeviceId(args->deviceId), |
708 | args->eventTime, |
709 | + 0, /* mac */ |
710 | mia::mir_modifiers_from_android(args->metaState), |
711 | mia::mir_pointer_action_from_masked_android(args->action & AMOTION_EVENT_ACTION_MASK), |
712 | mia::mir_pointer_buttons_from_android(args->buttonState), |
713 | @@ -133,6 +135,7 @@ |
714 | { |
715 | auto mir_event = mev::make_event(MirInputDeviceId(args->deviceId), |
716 | args->eventTime, |
717 | + 0, /* mac */ |
718 | mia::mir_modifiers_from_android(args->metaState)); |
719 | auto action = args->action; |
720 | size_t index_with_action = (action & AMOTION_EVENT_ACTION_POINTER_INDEX_MASK) >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT; |
721 | |
722 | === modified file 'src/server/input/surface_input_dispatcher.cpp' |
723 | --- src/server/input/surface_input_dispatcher.cpp 2015-08-11 02:35:40 +0000 |
724 | +++ src/server/input/surface_input_dispatcher.cpp 2015-08-20 16:14:01 +0000 |
725 | @@ -220,6 +220,7 @@ |
726 | |
727 | deliver(surface, &*mev::make_event(mir_input_event_get_device_id(iev), |
728 | std::chrono::nanoseconds(mir_input_event_get_event_time(iev)), |
729 | + 0, /* mac */ |
730 | mir_pointer_event_modifiers(pev), |
731 | action, mir_pointer_event_buttons(pev), |
732 | mir_pointer_event_axis_value(pev,mir_pointer_axis_x), |
733 | |
734 | === modified file 'src/server/input/validator.cpp' |
735 | --- src/server/input/validator.cpp 2015-08-14 14:51:26 +0000 |
736 | +++ src/server/input/validator.cpp 2015-08-20 16:14:01 +0000 |
737 | @@ -244,7 +244,7 @@ |
738 | MirTouchEvent const* last_ev = nullptr; |
739 | auto default_ev = mev::make_event(id, |
740 | std::chrono::high_resolution_clock::now().time_since_epoch(), |
741 | - mir_input_event_modifier_none); |
742 | + 0 /*mac*/, mir_input_event_modifier_none); |
743 | |
744 | if (it == last_event_by_device.end()) |
745 | { |
746 | |
747 | === modified file 'tests/acceptance-tests/test_client_input.cpp' |
748 | --- tests/acceptance-tests/test_client_input.cpp 2015-07-23 02:39:20 +0000 |
749 | +++ tests/acceptance-tests/test_client_input.cpp 2015-08-20 16:14:01 +0000 |
750 | @@ -574,7 +574,7 @@ |
751 | EXPECT_CALL(first_client, handle_input(mt::KeyDownEvent())) |
752 | .WillOnce(mt::WakeUp(&first_client.all_events_received)); |
753 | |
754 | - auto key_event = mir::events::make_event(MirInputDeviceId{0}, 0ns, mir_keyboard_action_down, 0, KEY_M, |
755 | + auto key_event = mir::events::make_event(MirInputDeviceId{0}, 0ns, 0, mir_keyboard_action_down, 0, KEY_M, |
756 | mir_input_event_modifier_none); |
757 | |
758 | server.the_shell()->focused_surface()->consume(*key_event); |
759 | |
760 | === modified file 'tests/acceptance-tests/test_surface_modifications.cpp' |
761 | --- tests/acceptance-tests/test_surface_modifications.cpp 2015-08-12 09:52:57 +0000 |
762 | +++ tests/acceptance-tests/test_surface_modifications.cpp 2015-08-20 16:14:01 +0000 |
763 | @@ -83,8 +83,9 @@ |
764 | auto const hscroll_value = 0.0; |
765 | auto const vscroll_value = 0.0; |
766 | auto const action = mir_pointer_action_button_down; |
767 | + auto const mac = 0; |
768 | |
769 | - auto const click_event = mev::make_event(device_id, timestamp, modifiers, |
770 | + auto const click_event = mev::make_event(device_id, timestamp, mac, modifiers, |
771 | action, mir_pointer_button_tertiary, x_axis_value, y_axis_value, hscroll_value, vscroll_value); |
772 | |
773 | server.the_shell()->handle(*click_event); |
774 | @@ -99,8 +100,9 @@ |
775 | auto const hscroll_value = 0.0; |
776 | auto const vscroll_value = 0.0; |
777 | auto const action = mir_pointer_action_motion; |
778 | + auto const mac = 0; |
779 | |
780 | - auto const drag_event = mev::make_event(device_id, timestamp, modifiers, |
781 | + auto const drag_event = mev::make_event(device_id, timestamp, mac, modifiers, |
782 | action, mir_pointer_button_tertiary, x_axis_value, y_axis_value, hscroll_value, vscroll_value); |
783 | |
784 | server.the_shell()->handle(*drag_event); |
785 | |
786 | === modified file 'tests/acceptance-tests/test_surface_placement.cpp' |
787 | --- tests/acceptance-tests/test_surface_placement.cpp 2015-07-29 09:28:52 +0000 |
788 | +++ tests/acceptance-tests/test_surface_placement.cpp 2015-08-20 16:14:01 +0000 |
789 | @@ -127,8 +127,9 @@ |
790 | auto const hscroll_value = 0.0; |
791 | auto const vscroll_value = 0.0; |
792 | auto const action = mir_pointer_action_button_down; |
793 | + auto const mac = 0; |
794 | |
795 | - auto const click_event = mev::make_event(device_id, std::chrono::nanoseconds(1), modifiers, |
796 | + auto const click_event = mev::make_event(device_id, std::chrono::nanoseconds(1), mac, modifiers, |
797 | action, depressed_buttons, x_axis_value, y_axis_value, hscroll_value, vscroll_value); |
798 | |
799 | server.the_shell()->handle(*click_event); |
800 | |
801 | === modified file 'tests/acceptance-tests/test_surface_specification.cpp' |
802 | --- tests/acceptance-tests/test_surface_specification.cpp 2015-07-29 09:28:52 +0000 |
803 | +++ tests/acceptance-tests/test_surface_specification.cpp 2015-08-20 16:14:01 +0000 |
804 | @@ -136,8 +136,9 @@ |
805 | auto const hscroll_value = 0.0; |
806 | auto const vscroll_value = 0.0; |
807 | auto const action = mir_pointer_action_button_down; |
808 | + auto const mac = 0; |
809 | |
810 | - auto const click_event = mev::make_event(device_id, timestamp, modifiers, |
811 | + auto const click_event = mev::make_event(device_id, timestamp, mac, modifiers, |
812 | action, mir_pointer_button_tertiary, x_axis_value, y_axis_value, hscroll_value, vscroll_value); |
813 | |
814 | server.the_shell()->handle(*click_event); |
815 | @@ -152,8 +153,9 @@ |
816 | auto const hscroll_value = 0.0; |
817 | auto const vscroll_value = 0.0; |
818 | auto const action = mir_pointer_action_motion; |
819 | + auto const mac = 0; |
820 | |
821 | - auto const drag_event = mev::make_event(device_id, timestamp, modifiers, |
822 | + auto const drag_event = mev::make_event(device_id, timestamp, mac, modifiers, |
823 | action, mir_pointer_button_tertiary, x_axis_value, y_axis_value, hscroll_value, vscroll_value); |
824 | |
825 | server.the_shell()->handle(*drag_event); |
826 | |
827 | === modified file 'tests/mir_test_framework/fake_input_device_impl.cpp' |
828 | --- tests/mir_test_framework/fake_input_device_impl.cpp 2015-08-07 05:46:34 +0000 |
829 | +++ tests/mir_test_framework/fake_input_device_impl.cpp 2015-08-20 16:14:01 +0000 |
830 | @@ -101,13 +101,14 @@ |
831 | |
832 | auto event_time = std::chrono::duration_cast<std::chrono::nanoseconds>( |
833 | std::chrono::system_clock::now().time_since_epoch()); |
834 | + auto mac = 0; |
835 | |
836 | auto input_action = |
837 | (key_params.action == synthesis::EventAction::Down) ? mir_keyboard_action_down : mir_keyboard_action_up; |
838 | |
839 | auto event_modifiers = mie::expand_modifiers(modifiers); |
840 | auto key_event = mir::events::make_event( |
841 | - device_id_unknown, event_time, input_action, key_code, key_params.scancode, event_modifiers); |
842 | + device_id_unknown, event_time, mac, input_action, key_code, key_params.scancode, event_modifiers); |
843 | |
844 | if (key_params.action == synthesis::EventAction::Down) |
845 | modifiers |= mie::to_modifier(key_params.scancode); |
846 | @@ -123,10 +124,12 @@ |
847 | { |
848 | auto event_time = std::chrono::duration_cast<std::chrono::nanoseconds>( |
849 | std::chrono::system_clock::now().time_since_epoch()); |
850 | + auto mac = 0; |
851 | auto action = update_buttons(button.action, mie::to_pointer_button(button.button)); |
852 | auto event_modifiers = mie::expand_modifiers(modifiers); |
853 | auto button_event = mir::events::make_event(device_id_unknown, |
854 | event_time, |
855 | + mac, |
856 | event_modifiers, |
857 | action, |
858 | buttons, |
859 | @@ -161,10 +164,12 @@ |
860 | |
861 | auto event_time = std::chrono::duration_cast<std::chrono::nanoseconds>( |
862 | std::chrono::system_clock::now().time_since_epoch()); |
863 | + auto mac = 0; |
864 | auto event_modifiers = mie::expand_modifiers(modifiers); |
865 | update_position(pointer.rel_x, pointer.rel_y); |
866 | auto pointer_event = mir::events::make_event(device_id_unknown, |
867 | event_time, |
868 | + mac, |
869 | event_modifiers, |
870 | mir_pointer_action_motion, |
871 | buttons, |
872 | @@ -191,9 +196,10 @@ |
873 | |
874 | auto event_time = std::chrono::duration_cast<std::chrono::nanoseconds>( |
875 | std::chrono::system_clock::now().time_since_epoch()); |
876 | + auto mac = 0; |
877 | auto event_modifiers = mie::expand_modifiers(modifiers); |
878 | |
879 | - auto touch_event = mir::events::make_event(device_id_unknown, event_time, event_modifiers); |
880 | + auto touch_event = mir::events::make_event(device_id_unknown, event_time, mac, event_modifiers); |
881 | |
882 | auto touch_action = mir_touch_action_up; |
883 | if (touch.action == synthesis::TouchParameters::Action::Tap) |
884 | |
885 | === modified file 'tests/unit-tests/client/input/test_android_input_receiver.cpp' |
886 | --- tests/unit-tests/client/input/test_android_input_receiver.cpp 2015-07-27 07:24:50 +0000 |
887 | +++ tests/unit-tests/client/input/test_android_input_receiver.cpp 2015-08-20 16:14:01 +0000 |
888 | @@ -69,6 +69,7 @@ |
889 | testing_key_event_scan_code, |
890 | 0 /* meta_state */, |
891 | 0 /* repeat_count */, |
892 | + 0 /* mac */, |
893 | std::chrono::nanoseconds(0) /* down_time */, |
894 | std::chrono::nanoseconds(0) /* event_time */); |
895 | } |
896 | @@ -95,6 +96,7 @@ |
897 | 0 /* y_offset */, |
898 | 0 /* x_precision */, |
899 | 0 /* y_precision */, |
900 | + 0 /* mac */, |
901 | std::chrono::nanoseconds(0) /* down_time */, |
902 | t, |
903 | default_pointer_count, |
904 | |
905 | === modified file 'tests/unit-tests/client/input/test_xkb_mapper.cpp' |
906 | --- tests/unit-tests/client/input/test_xkb_mapper.cpp 2015-06-17 05:20:42 +0000 |
907 | +++ tests/unit-tests/client/input/test_xkb_mapper.cpp 2015-08-20 16:14:01 +0000 |
908 | @@ -35,7 +35,8 @@ |
909 | |
910 | static int map_key(mircv::XKBMapper &mapper, MirKeyboardAction action, int scan_code) |
911 | { |
912 | - auto ev = mev::make_event(MirInputDeviceId(0), std::chrono::nanoseconds(0), action, |
913 | + auto mac = 0; |
914 | + auto ev = mev::make_event(MirInputDeviceId(0), std::chrono::nanoseconds(0), mac, action, |
915 | 0, scan_code, mir_input_event_modifier_none); |
916 | |
917 | mapper.update_state_and_map_event(*ev); |
918 | |
919 | === modified file 'tests/unit-tests/frontend/test_event_sender.cpp' |
920 | --- tests/unit-tests/frontend/test_event_sender.cpp 2015-06-25 19:29:44 +0000 |
921 | +++ tests/unit-tests/frontend/test_event_sender.cpp 2015-08-20 16:14:01 +0000 |
922 | @@ -97,7 +97,8 @@ |
923 | { |
924 | using namespace testing; |
925 | |
926 | - auto ev = mev::make_event(MirInputDeviceId(), std::chrono::nanoseconds(0), MirKeyboardAction(), |
927 | + auto mac = 0; |
928 | + auto ev = mev::make_event(MirInputDeviceId(), std::chrono::nanoseconds(0), mac, MirKeyboardAction(), |
929 | 0, 0, MirInputEventModifiers()); |
930 | |
931 | EXPECT_CALL(mock_msg_sender, send(_, _, _)) |
932 | |
933 | === modified file 'tests/unit-tests/input/android/test_android_input_lexicon.cpp' |
934 | --- tests/unit-tests/input/android/test_android_input_lexicon.cpp 2015-06-17 05:20:42 +0000 |
935 | +++ tests/unit-tests/input/android/test_android_input_lexicon.cpp 2015-08-20 16:14:01 +0000 |
936 | @@ -39,12 +39,13 @@ |
937 | const int32_t scan_code = 6; |
938 | const int32_t meta_state = AMETA_ALT_ON; |
939 | const int32_t repeat_count = 0; |
940 | + const uint64_t mac = 11; |
941 | auto const down_time = std::chrono::nanoseconds(9); |
942 | auto const event_time = std::chrono::nanoseconds(10); |
943 | |
944 | android_key_ev->initialize(device_id, source_id, action, flags, key_code, |
945 | scan_code, meta_state, repeat_count, |
946 | - down_time, event_time); |
947 | + mac, down_time, event_time); |
948 | |
949 | auto mir_ev = mia::Lexicon::translate(android_key_ev); |
950 | |
951 | @@ -81,6 +82,7 @@ |
952 | const float y_offset = 9; |
953 | const float x_precision = 10; |
954 | const float y_precision = 11; |
955 | + const uint64_t mac = 14; |
956 | auto const down_time = std::chrono::nanoseconds(12); |
957 | auto const event_time = std::chrono::nanoseconds(13); |
958 | const size_t pointer_count = 1; |
959 | @@ -111,7 +113,7 @@ |
960 | |
961 | android_motion_ev->initialize(device_id, source_id, action, flags, edge_flags, |
962 | meta_state, button_state, x_offset, y_offset, |
963 | - x_precision, y_precision, down_time, |
964 | + x_precision, y_precision, mac, down_time, |
965 | event_time, pointer_count, &pointer_properties, &pointer_coords); |
966 | |
967 | auto mir_ev = mia::Lexicon::translate(android_motion_ev); |
968 | @@ -156,6 +158,7 @@ |
969 | const float y_offset = 9; |
970 | const float x_precision = 10; |
971 | const float y_precision = 11; |
972 | + const uint64_t mac = 14; |
973 | const std::chrono::nanoseconds down_time = std::chrono::nanoseconds(12); |
974 | const std::chrono::nanoseconds event_time = std::chrono::nanoseconds(13); |
975 | const size_t pointer_count = 2; |
976 | @@ -197,7 +200,7 @@ |
977 | android_motion_ev->initialize(device_id, source_id, action, flags, |
978 | edge_flags, meta_state, 0, |
979 | x_offset, y_offset, x_precision, y_precision, |
980 | - down_time, event_time, pointer_count, |
981 | + mac, down_time, event_time, pointer_count, |
982 | pointer_properties, pointer_coords); |
983 | |
984 | auto mir_ev = mia::Lexicon::translate(android_motion_ev); |
985 | |
986 | === modified file 'tests/unit-tests/input/android/test_android_input_sender.cpp' |
987 | --- tests/unit-tests/input/android/test_android_input_sender.cpp 2015-07-23 02:39:20 +0000 |
988 | +++ tests/unit-tests/input/android/test_android_input_sender.cpp 2015-08-20 16:14:01 +0000 |
989 | @@ -103,9 +103,9 @@ |
990 | float test_y_coord[2] = {17, 9}; |
991 | |
992 | AndroidInputSender() |
993 | - : key_event(mev::make_event(MirInputDeviceId(), std::chrono::nanoseconds(1), mir_keyboard_action_down, |
994 | + : key_event(mev::make_event(MirInputDeviceId(), std::chrono::nanoseconds(1), 0, mir_keyboard_action_down, |
995 | 7, test_scan_code, mir_input_event_modifier_none)), |
996 | - motion_event(mev::make_event(MirInputDeviceId(), std::chrono::nanoseconds(-1), mir_input_event_modifier_none)) |
997 | + motion_event(mev::make_event(MirInputDeviceId(), std::chrono::nanoseconds(-1), 0, mir_input_event_modifier_none)) |
998 | { |
999 | using namespace ::testing; |
1000 | |
1001 | @@ -327,7 +327,7 @@ |
1002 | { |
1003 | register_surface(); |
1004 | |
1005 | - auto another_key_event = mev::make_event(MirInputDeviceId(), std::chrono::nanoseconds(1), mir_keyboard_action_down, |
1006 | + auto another_key_event = mev::make_event(MirInputDeviceId(), std::chrono::nanoseconds(1), 0, mir_keyboard_action_down, |
1007 | 9, test_scan_code, mir_input_event_modifier_none); |
1008 | |
1009 | sender.send_event(*key_event, channel); |
1010 | |
1011 | === modified file 'tests/unit-tests/input/android/test_input_translator.cpp' |
1012 | --- tests/unit-tests/input/android/test_input_translator.cpp 2015-08-07 05:46:34 +0000 |
1013 | +++ tests/unit-tests/input/android/test_input_translator.cpp 2015-08-20 16:14:01 +0000 |
1014 | @@ -53,6 +53,7 @@ |
1015 | } |
1016 | std::chrono::nanoseconds const some_time = std::chrono::nanoseconds(13); |
1017 | std::chrono::nanoseconds const later_time = std::chrono::nanoseconds(14); |
1018 | + const uint64_t mac = 16; |
1019 | const int32_t device_id = 13; |
1020 | const uint32_t source_id = 13; |
1021 | const uint32_t default_flags = 0; |
1022 | @@ -118,7 +119,7 @@ |
1023 | properties[1].id = 2; |
1024 | properties[2].id = 3; |
1025 | |
1026 | - droidinput::NotifyMotionArgs motion(some_time, device_id, source_id, 0, valid_motion_action, |
1027 | + droidinput::NotifyMotionArgs motion(some_time, mac, device_id, source_id, 0, valid_motion_action, |
1028 | no_flags, meta_state, button_state, edge_flags, three_pointers, properties, |
1029 | coords, x_precision, y_precision, later_time); |
1030 | |
1031 | @@ -167,7 +168,7 @@ |
1032 | properties[0].toolType = AMOTION_EVENT_TOOL_TYPE_FINGER; |
1033 | |
1034 | droidinput::NotifyMotionArgs motion( |
1035 | - some_time, device_id, source_id, 0, end_of_gesture, |
1036 | + some_time, mac, device_id, source_id, 0, end_of_gesture, |
1037 | no_flags, meta_state, button_state, edge_flags, 1, properties, |
1038 | coords, x_precision, y_precision, later_time); |
1039 | |
1040 | @@ -186,7 +187,7 @@ |
1041 | properties[1].id = 1; |
1042 | properties[2].id = 3; |
1043 | |
1044 | - droidinput::NotifyMotionArgs motion(some_time, device_id, source_id, 0, motion_action, no_flags, |
1045 | + droidinput::NotifyMotionArgs motion(some_time, mac, device_id, source_id, 0, motion_action, no_flags, |
1046 | meta_state, button_state, edge_flags, three_pointers, properties, coords, |
1047 | x_precision, y_precision, later_time); |
1048 | translator.notifyMotion(&motion); |
1049 | @@ -204,7 +205,7 @@ |
1050 | properties[1].id = 1; |
1051 | properties[2].id = 3; |
1052 | |
1053 | - droidinput::NotifyMotionArgs motion(some_time, device_id, source_id, 0, motion_action, no_flags, |
1054 | + droidinput::NotifyMotionArgs motion(some_time, mac, device_id, source_id, 0, motion_action, no_flags, |
1055 | meta_state, button_state, edge_flags, three_pointers, properties, coords, |
1056 | x_precision, y_precision, later_time); |
1057 | translator.notifyMotion(&motion); |
1058 | @@ -230,7 +231,7 @@ |
1059 | coords[0].setAxisValue(AMOTION_EVENT_AXIS_RX, dx); |
1060 | coords[0].setAxisValue(AMOTION_EVENT_AXIS_RY, dy); |
1061 | |
1062 | - droidinput::NotifyMotionArgs motion(some_time, device_id, AINPUT_SOURCE_MOUSE, 0, motion_action, no_flags, |
1063 | + droidinput::NotifyMotionArgs motion(some_time, mac, device_id, AINPUT_SOURCE_MOUSE, 0, motion_action, no_flags, |
1064 | meta_state, button_state, edge_flags, one_pointer, properties, coords, |
1065 | x_precision, y_precision, later_time); |
1066 | translator.notifyMotion(&motion); |
1067 | @@ -244,9 +245,9 @@ |
1068 | EXPECT_CALL(dispatcher, dispatch(mt::KeyDownEvent())).Times(1); |
1069 | EXPECT_CALL(dispatcher, dispatch(mt::KeyUpEvent())).Times(1); |
1070 | |
1071 | - droidinput::NotifyKeyArgs down(some_time, device_id, source_id, 0, AKEY_EVENT_ACTION_DOWN, |
1072 | + droidinput::NotifyKeyArgs down(some_time, mac, device_id, source_id, 0, AKEY_EVENT_ACTION_DOWN, |
1073 | no_flags, arbitrary_key_code, arbitrary_scan_code, no_modifiers, later_time); |
1074 | - droidinput::NotifyKeyArgs up(some_time, device_id, source_id, 0, AKEY_EVENT_ACTION_UP, |
1075 | + droidinput::NotifyKeyArgs up(some_time, mac, device_id, source_id, 0, AKEY_EVENT_ACTION_UP, |
1076 | no_flags, arbitrary_key_code, arbitrary_scan_code, no_modifiers, later_time); |
1077 | |
1078 | translator.notifyKey(&down); |
1079 | @@ -259,8 +260,9 @@ |
1080 | |
1081 | int32_t const device_id = 2, scan_code = 4, key_code = 5; |
1082 | std::chrono::nanoseconds event_time(1); |
1083 | + auto mac = 0; |
1084 | |
1085 | - auto expected = mev::make_event(MirInputDeviceId(device_id), event_time, |
1086 | + auto expected = mev::make_event(MirInputDeviceId(device_id), event_time, mac, |
1087 | mir_keyboard_action_down, key_code, scan_code, |
1088 | mir_input_event_modifier_shift); |
1089 | |
1090 | @@ -268,6 +270,7 @@ |
1091 | EXPECT_CALL(dispatcher, dispatch(mt::MirKeyEventMatches(*expected))).Times(1); |
1092 | |
1093 | droidinput::NotifyKeyArgs notified(event_time, |
1094 | + mac, |
1095 | device_id, |
1096 | AINPUT_SOURCE_KEYBOARD, |
1097 | default_policy_flags, |
1098 | @@ -286,11 +289,12 @@ |
1099 | using namespace ::testing; |
1100 | |
1101 | std::chrono::nanoseconds event_time(2); |
1102 | + auto mac = 0; |
1103 | int32_t device_id = 3; |
1104 | int32_t touch_id = 17; |
1105 | float x = 7, y = 8, pres = 9, tmaj = 10, tmin = 11, size = 12; |
1106 | |
1107 | - auto expected = mev::make_event(MirInputDeviceId(device_id), event_time, mir_input_event_modifier_none); |
1108 | + auto expected = mev::make_event(MirInputDeviceId(device_id), event_time, mac, mir_input_event_modifier_none); |
1109 | mev::add_touch(*expected, MirTouchId(touch_id), mir_touch_action_change, |
1110 | mir_touch_tooltype_finger, x, y, pres, tmaj, tmin, size); |
1111 | |
1112 | @@ -306,6 +310,7 @@ |
1113 | EXPECT_CALL(dispatcher, dispatch(mt::MirTouchEventMatches(*expected))).Times(1); |
1114 | |
1115 | droidinput::NotifyMotionArgs notified(std::chrono::nanoseconds(event_time), |
1116 | + mac, |
1117 | device_id, |
1118 | AINPUT_SOURCE_TOUCHSCREEN, |
1119 | default_policy_flags, |
1120 | @@ -333,7 +338,7 @@ |
1121 | ) |
1122 | ).Times(1); |
1123 | |
1124 | - droidinput::NotifyKeyArgs tester(some_time, device_id, source_id, |
1125 | + droidinput::NotifyKeyArgs tester(some_time, mac, device_id, source_id, |
1126 | GetParam().policy_flag, AKEY_EVENT_ACTION_DOWN, |
1127 | no_flags, arbitrary_key_code, arbitrary_scan_code, no_modifiers, later_time); |
1128 | |
1129 | |
1130 | === modified file 'tests/unit-tests/input/test_default_input_device_hub.cpp' |
1131 | --- tests/unit-tests/input/test_default_input_device_hub.cpp 2015-06-25 03:00:08 +0000 |
1132 | +++ tests/unit-tests/input/test_default_input_device_hub.cpp 2015-08-20 16:14:01 +0000 |
1133 | @@ -254,7 +254,9 @@ |
1134 | { |
1135 | using namespace ::testing; |
1136 | int64_t unset_input_device_id = 0; |
1137 | - auto event = mir::events::make_event(unset_input_device_id, arbitrary_timestamp, mir_keyboard_action_down, 0, KEY_A, mir_input_event_modifier_none); |
1138 | + auto mac = 0; |
1139 | + auto event = mir::events::make_event(unset_input_device_id, arbitrary_timestamp, mac, |
1140 | + mir_keyboard_action_down, 0, KEY_A, mir_input_event_modifier_none); |
1141 | |
1142 | mi::InputSink* sink; |
1143 | mi::InputDeviceInfo info; |
1144 | @@ -277,23 +279,24 @@ |
1145 | TEST_F(InputDeviceHubTest, forwards_touch_spots_to_visualizer) |
1146 | { |
1147 | using namespace ::testing; |
1148 | - auto touch_event_1 = mir::events::make_event(0, arbitrary_timestamp, mir_input_event_modifier_none); |
1149 | + auto mac = 0; |
1150 | + auto touch_event_1 = mir::events::make_event(0, arbitrary_timestamp, mac, mir_input_event_modifier_none); |
1151 | mir::events::add_touch(*touch_event_1, 0, mir_touch_action_down, mir_touch_tooltype_finger, |
1152 | 21.0f, 34.0f, 50.0f, 15.0f, 5.0f, 4.0f); |
1153 | |
1154 | - auto touch_event_2 = mir::events::make_event(0, arbitrary_timestamp, mir_input_event_modifier_none); |
1155 | + auto touch_event_2 = mir::events::make_event(0, arbitrary_timestamp, mac, mir_input_event_modifier_none); |
1156 | mir::events::add_touch(*touch_event_2, 0, mir_touch_action_change, mir_touch_tooltype_finger, |
1157 | 24.0f, 34.0f, 50.0f, 15.0f, 5.0f, 4.0f); |
1158 | mir::events::add_touch(*touch_event_2, 1, mir_touch_action_down, mir_touch_tooltype_finger, |
1159 | 60.0f, 34.0f, 50.0f, 15.0f, 5.0f, 4.0f); |
1160 | |
1161 | - auto touch_event_3 = mir::events::make_event(0, arbitrary_timestamp, mir_input_event_modifier_none); |
1162 | + auto touch_event_3 = mir::events::make_event(0, arbitrary_timestamp, mac, mir_input_event_modifier_none); |
1163 | mir::events::add_touch(*touch_event_3, 0, mir_touch_action_up, mir_touch_tooltype_finger, 24.0f, |
1164 | 34.0f, 50.0f, 15.0f, 5.0f, 4.0f); |
1165 | mir::events::add_touch(*touch_event_3, 1, mir_touch_action_change, mir_touch_tooltype_finger, |
1166 | 70.0f, 30.0f, 50.0f, 15.0f, 5.0f, 4.0f); |
1167 | |
1168 | - auto touch_event_4 = mir::events::make_event(0, arbitrary_timestamp, mir_input_event_modifier_none); |
1169 | + auto touch_event_4 = mir::events::make_event(0, arbitrary_timestamp, mac, mir_input_event_modifier_none); |
1170 | mir::events::add_touch(*touch_event_4, 1, mir_touch_action_up, mir_touch_tooltype_finger, 70.0f, |
1171 | 35.0f, 50.0f, 15.0f, 5.0f, 4.0f); |
1172 | |
1173 | @@ -368,8 +371,9 @@ |
1174 | using namespace ::testing; |
1175 | |
1176 | auto x = 12.2f, y = 14.3f; |
1177 | + auto mac = 0; |
1178 | |
1179 | - auto event = mir::events::make_event(0, 0ns, mir_input_event_modifier_none, mir_pointer_action_motion, 0, |
1180 | + auto event = mir::events::make_event(0, 0ns, mac, mir_input_event_modifier_none, mir_pointer_action_motion, 0, |
1181 | x, y, 0.0f, 0.0f); |
1182 | |
1183 | EXPECT_CALL(mock_cursor_listener, cursor_moved_to(x, y)).Times(1); |
1184 | |
1185 | === modified file 'tests/unit-tests/input/test_event_builders.cpp' |
1186 | --- tests/unit-tests/input/test_event_builders.cpp 2015-06-18 02:46:16 +0000 |
1187 | +++ tests/unit-tests/input/test_event_builders.cpp 2015-08-20 16:14:01 +0000 |
1188 | @@ -29,6 +29,7 @@ |
1189 | { |
1190 | MirInputDeviceId const device_id = 7; |
1191 | std::chrono::nanoseconds const timestamp = std::chrono::nanoseconds(39); |
1192 | + uint64_t const mac = 0; |
1193 | MirInputEventModifiers const modifiers = mir_input_event_modifier_meta; |
1194 | }; |
1195 | } |
1196 | @@ -40,7 +41,7 @@ |
1197 | int const scan_code = 17; |
1198 | |
1199 | auto ev = mev::make_event(device_id, timestamp, |
1200 | - action, key_code, scan_code, modifiers); |
1201 | + mac, action, key_code, scan_code, modifiers); |
1202 | auto e = ev.get(); |
1203 | |
1204 | EXPECT_EQ(mir_event_type_input, mir_event_get_type(e)); |
1205 | @@ -67,7 +68,7 @@ |
1206 | float size_values[] = {4, 9, 6}; |
1207 | |
1208 | auto ev = mev::make_event(device_id, timestamp, |
1209 | - modifiers); |
1210 | + mac, modifiers); |
1211 | for (unsigned i = 0; i < touch_count; i++) |
1212 | { |
1213 | mev::add_touch(*ev, touch_ids[i], actions[i], tooltypes[i], x_axis_values[i], y_axis_values[i], |
1214 | @@ -101,7 +102,7 @@ |
1215 | MirPointerAction action = mir_pointer_action_enter; |
1216 | auto depressed_buttons = mir_pointer_button_back | mir_pointer_button_tertiary; |
1217 | float x_axis_value = 3.9, y_axis_value = 7.4, hscroll_value = .9, vscroll_value = .3; |
1218 | - auto ev = mev::make_event(device_id, timestamp, modifiers, |
1219 | + auto ev = mev::make_event(device_id, timestamp, mac, modifiers, |
1220 | action, depressed_buttons, x_axis_value, y_axis_value, hscroll_value, vscroll_value); |
1221 | auto e = ev.get(); |
1222 | |
1223 | @@ -129,7 +130,7 @@ |
1224 | { |
1225 | MirTouchAction action = mir_touch_action_down; |
1226 | |
1227 | - auto ev = mev::make_event(device_id, timestamp, modifiers); |
1228 | + auto ev = mev::make_event(device_id, timestamp, mac, modifiers); |
1229 | mev::add_touch(*ev, 0, action, mir_touch_tooltype_finger, 0, 0, 0, 0, 0, 0); |
1230 | auto e = ev.get(); |
1231 | |
1232 | @@ -145,7 +146,7 @@ |
1233 | { |
1234 | MirTouchAction action = mir_touch_action_up; |
1235 | |
1236 | - auto ev = mev::make_event(device_id, timestamp, modifiers); |
1237 | + auto ev = mev::make_event(device_id, timestamp, mac, modifiers); |
1238 | mev::add_touch(*ev, 0, action, mir_touch_tooltype_finger, 0, 0, 0, 0, 0, 0); |
1239 | auto e = ev.get(); |
1240 | |
1241 | @@ -161,7 +162,7 @@ |
1242 | { |
1243 | float x_axis_value = 3.9, y_axis_value = 7.4, hscroll_value = .9, vscroll_value = .3; |
1244 | MirPointerAction action = mir_pointer_action_motion; |
1245 | - auto ev = mev::make_event(device_id, timestamp, modifiers, |
1246 | + auto ev = mev::make_event(device_id, timestamp, mac, modifiers, |
1247 | action, 0, x_axis_value, y_axis_value, hscroll_value, vscroll_value); |
1248 | auto e = ev.get(); |
1249 | |
1250 | |
1251 | === modified file 'tests/unit-tests/input/test_event_filter_chain_dispatcher.cpp' |
1252 | --- tests/unit-tests/input/test_event_filter_chain_dispatcher.cpp 2015-06-25 03:00:08 +0000 |
1253 | +++ tests/unit-tests/input/test_event_filter_chain_dispatcher.cpp 2015-08-20 16:14:01 +0000 |
1254 | @@ -43,7 +43,7 @@ |
1255 | struct EventFilterChainDispatcher : public ::testing::Test |
1256 | { |
1257 | mir::EventUPtr const event = mir::events::make_event(MirInputDeviceId(), |
1258 | - std::chrono::nanoseconds(0), MirKeyboardAction(), |
1259 | + std::chrono::nanoseconds(0), 0, MirKeyboardAction(), |
1260 | xkb_keysym_t(), 0, MirInputEventModifiers()); |
1261 | }; |
1262 | } |
1263 | |
1264 | === modified file 'tests/unit-tests/input/test_key_repeat_dispatcher.cpp' |
1265 | --- tests/unit-tests/input/test_key_repeat_dispatcher.cpp 2015-07-16 07:03:19 +0000 |
1266 | +++ tests/unit-tests/input/test_key_repeat_dispatcher.cpp 2015-08-20 16:14:01 +0000 |
1267 | @@ -88,11 +88,11 @@ |
1268 | { |
1269 | mir::EventUPtr a_key_down_event() |
1270 | { |
1271 | - return mev::make_event(0, std::chrono::nanoseconds(0), mir_keyboard_action_down, 0, 0, mir_input_event_modifier_alt); |
1272 | + return mev::make_event(0, std::chrono::nanoseconds(0), 0, mir_keyboard_action_down, 0, 0, mir_input_event_modifier_alt); |
1273 | } |
1274 | mir::EventUPtr a_key_up_event() |
1275 | { |
1276 | - return mev::make_event(0, std::chrono::nanoseconds(0), mir_keyboard_action_up, 0, 0, mir_input_event_modifier_alt); |
1277 | + return mev::make_event(0, std::chrono::nanoseconds(0), 0, mir_keyboard_action_up, 0, 0, mir_input_event_modifier_alt); |
1278 | } |
1279 | } |
1280 | |
1281 | |
1282 | === modified file 'tests/unit-tests/input/test_surface_input_dispatcher.cpp' |
1283 | --- tests/unit-tests/input/test_surface_input_dispatcher.cpp 2015-08-11 02:35:40 +0000 |
1284 | +++ tests/unit-tests/input/test_surface_input_dispatcher.cpp 2015-08-20 16:14:01 +0000 |
1285 | @@ -138,12 +138,12 @@ |
1286 | } |
1287 | mir::EventUPtr press(int scan_code = 7) |
1288 | { |
1289 | - return mev::make_event(id, std::chrono::nanoseconds(0), |
1290 | + return mev::make_event(id, std::chrono::nanoseconds(0), 0, |
1291 | mir_keyboard_action_down, 0, scan_code, mir_input_event_modifier_alt); |
1292 | } |
1293 | mir::EventUPtr release(int scan_code = 7) |
1294 | { |
1295 | - return mev::make_event(id, std::chrono::nanoseconds(0), |
1296 | + return mev::make_event(id, std::chrono::nanoseconds(0), 0, |
1297 | mir_keyboard_action_up, 0, scan_code, mir_input_event_modifier_alt); |
1298 | } |
1299 | MirInputDeviceId const id; |
1300 | @@ -159,7 +159,7 @@ |
1301 | |
1302 | mir::EventUPtr move_to(geom::Point const& location) |
1303 | { |
1304 | - return mev::make_event(id, std::chrono::nanoseconds(0), |
1305 | + return mev::make_event(id, std::chrono::nanoseconds(0), 0, |
1306 | 0, mir_pointer_action_motion, buttons, |
1307 | location.x.as_int(), location.y.as_int(), |
1308 | 0, 0); |
1309 | @@ -168,7 +168,7 @@ |
1310 | { |
1311 | buttons &= ~button; |
1312 | |
1313 | - return mev::make_event(id, std::chrono::nanoseconds(0), |
1314 | + return mev::make_event(id, std::chrono::nanoseconds(0), 0, |
1315 | 0, mir_pointer_action_button_up, buttons, |
1316 | location.x.as_int(), location.y.as_int(), |
1317 | 0, 0); |
1318 | @@ -177,7 +177,7 @@ |
1319 | { |
1320 | buttons |= button; |
1321 | |
1322 | - return mev::make_event(id, std::chrono::nanoseconds(0), |
1323 | + return mev::make_event(id, std::chrono::nanoseconds(0), 0, |
1324 | 0, mir_pointer_action_button_down, buttons, |
1325 | location.x.as_int(), location.y.as_int(), |
1326 | 0, 0); |
1327 | @@ -196,7 +196,7 @@ |
1328 | |
1329 | mir::EventUPtr move_to(geom::Point const& point) |
1330 | { |
1331 | - auto ev = mev::make_event(id, std::chrono::nanoseconds(0), 0); |
1332 | + auto ev = mev::make_event(id, std::chrono::nanoseconds(0), 0, 0); |
1333 | mev::add_touch(*ev, 0, mir_touch_action_change, |
1334 | mir_touch_tooltype_finger, point.x.as_int(), point.y.as_int(), |
1335 | touched ? 1.0 : 0.0, |
1336 | @@ -209,7 +209,7 @@ |
1337 | { |
1338 | touched = true; |
1339 | |
1340 | - auto ev = mev::make_event(id, std::chrono::nanoseconds(0), 0); |
1341 | + auto ev = mev::make_event(id, std::chrono::nanoseconds(0), 0, 0); |
1342 | mev::add_touch(*ev, 0, mir_touch_action_down, |
1343 | mir_touch_tooltype_finger, point.x.as_int(), point.y.as_int(), |
1344 | 1.0, 1.0, 1.0, 1.0); |
1345 | @@ -219,7 +219,7 @@ |
1346 | { |
1347 | touched = true; |
1348 | |
1349 | - auto ev = mev::make_event(id, std::chrono::nanoseconds(0), 0); |
1350 | + auto ev = mev::make_event(id, std::chrono::nanoseconds(0), 0, 0); |
1351 | mev::add_touch(*ev, 0, mir_touch_action_down, |
1352 | mir_touch_tooltype_finger, point1.x.as_int(), point1.y.as_int(), |
1353 | 1.0, 1.0, 1.0, 1.0); |
1354 | @@ -232,7 +232,7 @@ |
1355 | { |
1356 | touched = false; |
1357 | |
1358 | - auto ev = mev::make_event(id, std::chrono::nanoseconds(0), 0); |
1359 | + auto ev = mev::make_event(id, std::chrono::nanoseconds(0), 0, 0); |
1360 | mev::add_touch(*ev, 0, mir_touch_action_up, |
1361 | mir_touch_tooltype_finger, point.x.as_int(), point.y.as_int(), |
1362 | 0.0, 0.0, 0.0, 0.0); |
1363 | @@ -242,7 +242,7 @@ |
1364 | { |
1365 | touched = false; |
1366 | |
1367 | - auto ev = mev::make_event(id, std::chrono::nanoseconds(0), 0); |
1368 | + auto ev = mev::make_event(id, std::chrono::nanoseconds(0), 0, 0); |
1369 | mev::add_touch(*ev, 0, mir_touch_action_up, |
1370 | mir_touch_tooltype_finger, point1.x.as_int(), point1.y.as_int(), |
1371 | 1.0, 1.0, 1.0, 1.0); |
1372 | |
1373 | === modified file 'tests/unit-tests/input/test_validator.cpp' |
1374 | --- tests/unit-tests/input/test_validator.cpp 2015-06-30 23:23:17 +0000 |
1375 | +++ tests/unit-tests/input/test_validator.cpp 2015-08-20 16:14:01 +0000 |
1376 | @@ -67,7 +67,7 @@ |
1377 | mir::EventUPtr make_touch(MirTouchId id, MirTouchAction action) |
1378 | { |
1379 | auto ev = mev::make_event(MirInputDeviceId(0), std::chrono::nanoseconds(0), |
1380 | - mir_input_event_modifier_none); |
1381 | + 0, mir_input_event_modifier_none); |
1382 | add_another_touch(ev, id, action); |
1383 | return ev; |
1384 | } |
1385 | |
1386 | === modified file 'tests/unit-tests/scene/test_abstract_shell.cpp' |
1387 | --- tests/unit-tests/scene/test_abstract_shell.cpp 2015-06-30 04:51:42 +0000 |
1388 | +++ tests/unit-tests/scene/test_abstract_shell.cpp 2015-08-20 16:14:01 +0000 |
1389 | @@ -136,6 +136,7 @@ |
1390 | } |
1391 | |
1392 | std::chrono::nanoseconds const event_timestamp = std::chrono::nanoseconds(0); |
1393 | + uint64_t const mac = 0; |
1394 | }; |
1395 | } |
1396 | |
1397 | @@ -251,6 +252,7 @@ |
1398 | auto const event = mir::events::make_event( |
1399 | mir_input_event_type_key, |
1400 | event_timestamp, |
1401 | + mac, |
1402 | action, |
1403 | key_code, |
1404 | scan_code, |
1405 | @@ -271,6 +273,7 @@ |
1406 | auto const event = mir::events::make_event( |
1407 | mir_input_event_type_touch, |
1408 | event_timestamp, |
1409 | + mac, |
1410 | modifiers); |
1411 | |
1412 | EXPECT_CALL(*wm, handle_touch_event(_)) |
1413 | @@ -294,6 +297,7 @@ |
1414 | auto const event = mir::events::make_event( |
1415 | mir_input_event_type_pointer, |
1416 | event_timestamp, |
1417 | + mac, |
1418 | modifiers, |
1419 | action, |
1420 | buttons_pressed, |
1421 | |
1422 | === modified file 'tests/unit-tests/scene/test_surface.cpp' |
1423 | --- tests/unit-tests/scene/test_surface.cpp 2015-07-22 02:54:31 +0000 |
1424 | +++ tests/unit-tests/scene/test_surface.cpp 2015-08-20 16:14:01 +0000 |
1425 | @@ -404,9 +404,9 @@ |
1426 | std::shared_ptr<mg::CursorImage>(), |
1427 | report); |
1428 | |
1429 | - auto key_event = mev::make_event(MirInputDeviceId(0), std::chrono::nanoseconds(0), |
1430 | + auto key_event = mev::make_event(MirInputDeviceId(0), std::chrono::nanoseconds(0), 0, |
1431 | mir_keyboard_action_down, 0, 0, mir_input_event_modifier_none); |
1432 | - auto touch_event = mev::make_event(MirInputDeviceId(0), std::chrono::nanoseconds(0), |
1433 | + auto touch_event = mev::make_event(MirInputDeviceId(0), std::chrono::nanoseconds(0), 0, |
1434 | mir_input_event_modifier_none); |
1435 | mev::add_touch(*touch_event, 0, mir_touch_action_down, mir_touch_tooltype_finger, 0, 0, |
1436 | 0, 0, 0, 0); |
FAILED: Continuous integration, rev:2848 jenkins. qa.ubuntu. com/job/ mir-ci/ 4605/ jenkins. qa.ubuntu. com/job/ mir-android- vivid-i386- build/3569 s-jenkins. ubuntu- ci:8080/ job/mir- clang-ts- wily-amd64- build/432/ console jenkins. qa.ubuntu. com/job/ mir-clang- wily-amd64- build/1104/ console jenkins. qa.ubuntu. com/job/ mir-mediumtests -vivid- touch/3517/ console jenkins. qa.ubuntu. com/job/ mir-wily- amd64-ci/ 754 jenkins. qa.ubuntu. com/job/ mir-wily- amd64-ci/ 754/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 3517 jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 3517/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -runner- mako/6292/ console s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 22659
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- ci/4605/ rebuild
http://