Merge lp:~dandrader/qtmir/keyState into lp:qtmir
- keyState
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Gerry Boland | ||||
Approved revision: | 629 | ||||
Merged at revision: | 630 | ||||
Proposed branch: | lp:~dandrader/qtmir/keyState | ||||
Merge into: | lp:qtmir | ||||
Prerequisite: | lp:~gerboland/qtmir/availableDesktopAreaTrial | ||||
Diff against target: |
211 lines (+115/-6) 3 files modified
src/modules/Unity/Application/mirsurface.cpp (+94/-4) src/modules/Unity/Application/mirsurface.h (+20/-1) src/platforms/mirserver/eventbuilder.h (+1/-1) |
||||
To merge this branch: | bzr merge lp:~dandrader/qtmir/keyState | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gerry Boland (community) | Approve | ||
Unity8 CI Bot (community) | continuous-integration | Approve | |
Review via email: mp+320930@code.launchpad.net |
This proposal supersedes a proposal from 2017-03-22.
Commit message
Ensure the window that got a key down also gets the corresponding key up
Otherwise it will be left in a inconsistent state (with a pressed key hanging around).
QQuickWindow's input dispatching doesn't guarantee that for its QQuickItem.
So we have to do it ourselves.
This can happen when qml active focus changes in response to a key press.
Eg: client creates a child window in response to a Ctrl+O. By the time the user
releases the Ctrl, active focus will already be in the child window, so the child window
will get the release event instead of the top-level one.
Description of the change
* Are there any related MPs required for this MP to build/function as expected? Please list.
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal | # |
If the surface looses active focus, don't we inform Mir? Why not send the key release event then? Would be more efficient than checking on every key_up
Also, please avoid using singleton pattern, it makes testing impossible. And speaking of which, can you add test?
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal | # |
On 20/03/2017 14:08, Gerry Boland wrote:
> Review: Needs Information
>
> If the surface looses active focus, don't we inform Mir?
It's the other way around. Mir surface focus is what drives qml active
focus. Nowadays qml active focus by itself doesn't carry much meaning in
terms of window management.
> Why not send the key release event then? Would be more efficient than checking on every key_up
Because the key is actually still pressed. If the same window gets focus
again moments later and only then the key is lifted the client would
receive a second key_up event. Unless we keep track of what lies we have
told already to the clients or devise some other special rules.
> Also, please avoid using singleton pattern, it makes testing impossible.
Yeah, that was the easiest (laziest) way to get the two talking (event
feeder and policy). Will see if I can get something nicer. Suggestions?
But before I spend too much time on the implementation details of this
MP I would like to get feedback on the overall approach first.
> And speaking of which, can you add test?
For WindowManagemen
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal | # |
> On 20/03/2017 14:08, Gerry Boland wrote:
> > Review: Needs Information
> >
> > If the surface looses active focus, don't we inform Mir?
>
> It's the other way around. Mir surface focus is what drives qml active
> focus. Nowadays qml active focus by itself doesn't carry much meaning in
> terms of window management.
There are more things in the QML scene that just MirSurfaces that can get activeFocus though. When activeFocus does switch to the search box in the AppDrawer (as example), we are indeed telling Mir somehow that the MirSurface has not got input focus (I just tested gedit, the cursor does stop flashing when the text box in the app drawer is focused). Since this bug occurs due to focus changing while modifier key is down, my initial thinking was we could use the focus change to implement a workaround.
What I don't know is if the WMpolicy if notified when the MirSurface it has selected to be focused has lost actual input focus (activeFocus). Do you know?
> > Why not send the key release event then? Would be more efficient than
> checking on every key_up
>
> Because the key is actually still pressed. If the same window gets focus
> again moments later and only then the key is lifted the client would
> receive a second key_up event. Unless we keep track of what lies we have
> told already to the clients or devise some other special rules.
This appears to be a QML subtlety we're working around, as a non-QML Qt shell would not suffer from this issue, right? So could the MirSurfaceItem keep track of the key state itself? If the MSI looses activeFocus, it send key-release to the client. Then if it gets focus again, check if key is still down (not sure how tbh, maybe QML sends the key to the Item again immediately??), and if so, re-send it to client.
I'm not 100% certain what is the best approach yet.
> > Also, please avoid using singleton pattern, it makes testing impossible.
>
> Yeah, that was the easiest (laziest) way to get the two talking (event
> feeder and policy). Will see if I can get something nicer. Suggestions?
Nothing better than the usual piping an object around, so everyone who needs it gets a pointer to it. Sorry :(
> But before I spend too much time on the implementation details of this
> MP I would like to get feedback on the overall approach first.
Ah ok, I hope I've supplied that at least
>
> > And speaking of which, can you add test?
>
> For WindowManagemen
More the logic you're adding. But please ignore me until you settle on the approach you want.
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal | # |
On 21/03/2017 09:37, Gerry Boland wrote:
> This appears to be a QML subtlety we're working around, as a non-QML Qt shell would not suffer from this issue, right?
Yes. As I said, QQuickWindow input dispatching not perfectly suited for
shells.
> So could the MirSurfaceItem keep track of the key state itself?
Sure.
> If the MSI looses activeFocus, it send key-release to the client. Then if it gets focus again, check if key is still down (not sure how tbh, maybe QML sends the key to the Item again immediately??), and if so, re-send it to client.
It can't check the key state, but it can ignore a key-up for a key that
it didn't tell its surface it was down (because lied or whatever).
> I'm not 100% certain what is the best approach yet.
Working around QQuickWindow input dispatching will never be beautiful. So, should I go for the MirSurfaceItem-
I'm fine either way. I put in the policy to avoid sending fake input to clients and as a general rule-of-thumb of "putting things in the miral policy"/"keep the policy in the loop".
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal | # |
I think I'd prefer using MirSurfaceItem-
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:626
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal | # |
+++ src/modules/
Could you move the implementation of the PressedKey constructor into the cpp file please, it is big enough a header file.
+++ src/modules/
You're using QElapsedTimer to get the current value of the monotonic clock, yes? If so, we really only need one QElapsedTimer everywhere, so could make it static singeton and add a static function that calls msecsSinceReference on it and returns the val. wdyt?
Code makes sense, I just need to test. It does need a big comment explaining why we're doing this though. Do the QtWayland guys have the same issue, wonder if they do a similar fix or not...
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal | # |
> +++ src/modules/
> Could you move the implementation of the PressedKey constructor into the cpp
> file please, it is big enough a header file.
Done.
>
> +++ src/modules/
> You're using QElapsedTimer to get the current value of the monotonic clock,
> yes? If so, we really only need one QElapsedTimer everywhere, so could make it
> static singeton and add a static function that calls msecsSinceReference on it
> and returns the val. wdyt?
Right. Done.
> Code makes sense, I just need to test. It does need a big comment explaining
> why we're doing this though. Do the QtWayland guys have the same issue, wonder
> if they do a similar fix or not...
Added a big fat comment.
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:627
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:627
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:627
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:627
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Gerry Boland (gerboland) wrote : | # |
How about using the anonymous namespace we have? I can stick this in there
static qint64 msecsSinceRefer
{
static QElapsedTimer elapsedTimer;
elapsedTime
return elapsedTimer.
}
and it works ok. After all it is just a function to return a timestamp, which is a purely internal implementation thing that doesn't need to be a class member IMO.
+ if (m_focused) {
releaseAllPr
Why not on unfocus?
- 628. By Daniel d'Andrada
-
Some refactoring as per review feedback
- 629. By Daniel d'Andrada
-
update copyright header
Daniel d'Andrada (dandrader) wrote : | # |
On 24/03/2017 15:37, Gerry Boland wrote:
> How about using the anonymous namespace we have? I can stick this in there
>
> static qint64 msecsSinceRefer
> {
> static QElapsedTimer elapsedTimer;
> elapsedTimer.
> return elapsedTimer.
> }
>
> and it works ok. After all it is just a function to return a timestamp, which is a purely internal implementation thing that doesn't need to be a class member IMO.
Yes, makes for less code. Done.
> + if (m_focused) {
> releaseAllPress
> Why not on unfocus?
Because an unfocused surface, by definition, shouldn't be receiving
input events.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:629
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Gerry Boland (gerboland) wrote : | # |
> Because an unfocused surface, by definition, shouldn't be receiving
> input events.
Yeah. Not ideal, but as we have no reliable way to send those events just before a surface is send the unfocus event, this is the best that can be done.
Tested and works ok
Preview Diff
1 | === modified file 'src/modules/Unity/Application/mirsurface.cpp' | |||
2 | --- src/modules/Unity/Application/mirsurface.cpp 2017-03-24 18:56:33 +0000 | |||
3 | +++ src/modules/Unity/Application/mirsurface.cpp 2017-03-24 18:56:33 +0000 | |||
4 | @@ -41,6 +41,7 @@ | |||
5 | 41 | #include <logging.h> | 41 | #include <logging.h> |
6 | 42 | 42 | ||
7 | 43 | // Qt | 43 | // Qt |
8 | 44 | #include <QElapsedTimer> | ||
9 | 44 | #include <QQmlEngine> | 45 | #include <QQmlEngine> |
10 | 45 | #include <QScreen> | 46 | #include <QScreen> |
11 | 46 | 47 | ||
12 | @@ -68,8 +69,16 @@ | |||
13 | 68 | }; | 69 | }; |
14 | 69 | Q_DECLARE_FLAGS(DirtyStates, DirtyState) | 70 | Q_DECLARE_FLAGS(DirtyStates, DirtyState) |
15 | 70 | 71 | ||
16 | 72 | qint64 msecsSinceReference() | ||
17 | 73 | { | ||
18 | 74 | static QElapsedTimer elapsedTimer; | ||
19 | 75 | elapsedTimer.start(); | ||
20 | 76 | return elapsedTimer.msecsSinceReference(); | ||
21 | 77 | } | ||
22 | 78 | |||
23 | 71 | } // namespace { | 79 | } // namespace { |
24 | 72 | 80 | ||
25 | 81 | |||
26 | 73 | class MirSurface::SurfaceObserverImpl : public SurfaceObserver, public mir::scene::SurfaceObserver | 82 | class MirSurface::SurfaceObserverImpl : public SurfaceObserver, public mir::scene::SurfaceObserver |
27 | 74 | { | 83 | { |
28 | 75 | public: | 84 | public: |
29 | @@ -409,6 +418,25 @@ | |||
30 | 409 | 418 | ||
31 | 410 | m_focused = value; | 419 | m_focused = value; |
32 | 411 | Q_EMIT focusedChanged(value); | 420 | Q_EMIT focusedChanged(value); |
33 | 421 | |||
34 | 422 | if (m_focused) { | ||
35 | 423 | /* | ||
36 | 424 | Ensure the window that got a key down also gets the corresponding key up | ||
37 | 425 | |||
38 | 426 | Otherwise it will be left in a inconsistent state (with a pressed key hanging around). | ||
39 | 427 | |||
40 | 428 | QQuickWindow's input dispatching doesn't guarantee that for its QQuickItems. | ||
41 | 429 | So we have to do it ourselves. | ||
42 | 430 | |||
43 | 431 | This can happen when qml active focus changes in response to a key press. | ||
44 | 432 | Eg: client creates a child window in response to a Ctrl+O. By the time the user | ||
45 | 433 | releases the Ctrl, active focus will already be in the child window, so the child window | ||
46 | 434 | will get the release event instead of the top-level one. To solve this, once the top-level | ||
47 | 435 | window gets active focus again, we synthesize KeyRelease events for all keys this window | ||
48 | 436 | thinks are still pressed. | ||
49 | 437 | */ | ||
50 | 438 | releaseAllPressedKeys(); | ||
51 | 439 | } | ||
52 | 412 | } | 440 | } |
53 | 413 | 441 | ||
54 | 414 | void MirSurface::setViewActiveFocus(qintptr viewId, bool value) | 442 | void MirSurface::setViewActiveFocus(qintptr viewId, bool value) |
55 | @@ -661,6 +689,18 @@ | |||
56 | 661 | 689 | ||
57 | 662 | void MirSurface::keyPressEvent(QKeyEvent *qtEvent) | 690 | void MirSurface::keyPressEvent(QKeyEvent *qtEvent) |
58 | 663 | { | 691 | { |
59 | 692 | { | ||
60 | 693 | if (!qtEvent->isAutoRepeat()) { | ||
61 | 694 | Q_ASSERT(!isKeyPressed(qtEvent->nativeVirtualKey())); | ||
62 | 695 | PressedKey pressedKey(qtEvent, msecsSinceReference()); | ||
63 | 696 | auto info = EventBuilder::instance()->findInfo(qtEvent->timestamp()); | ||
64 | 697 | if (info) { | ||
65 | 698 | pressedKey.deviceId = info->deviceId; | ||
66 | 699 | } | ||
67 | 700 | m_pressedKeys.append(std::move(pressedKey)); | ||
68 | 701 | } | ||
69 | 702 | } | ||
70 | 703 | |||
71 | 664 | auto ev = EventBuilder::instance()->makeMirEvent(qtEvent); | 704 | auto ev = EventBuilder::instance()->makeMirEvent(qtEvent); |
72 | 665 | auto ev1 = reinterpret_cast<MirKeyboardEvent const*>(ev.get()); | 705 | auto ev1 = reinterpret_cast<MirKeyboardEvent const*>(ev.get()); |
73 | 666 | m_controller->deliverKeyboardEvent(m_window, ev1); | 706 | m_controller->deliverKeyboardEvent(m_window, ev1); |
74 | @@ -669,10 +709,14 @@ | |||
75 | 669 | 709 | ||
76 | 670 | void MirSurface::keyReleaseEvent(QKeyEvent *qtEvent) | 710 | void MirSurface::keyReleaseEvent(QKeyEvent *qtEvent) |
77 | 671 | { | 711 | { |
82 | 672 | auto ev = EventBuilder::instance()->makeMirEvent(qtEvent); | 712 | if (isKeyPressed(qtEvent->nativeVirtualKey())) { |
83 | 673 | auto ev1 = reinterpret_cast<MirKeyboardEvent const*>(ev.get()); | 713 | forgetPressedKey(qtEvent->nativeVirtualKey()); |
84 | 674 | m_controller->deliverKeyboardEvent(m_window, ev1); | 714 | auto ev = EventBuilder::instance()->makeMirEvent(qtEvent); |
85 | 675 | qtEvent->accept(); | 715 | auto ev1 = reinterpret_cast<MirKeyboardEvent const*>(ev.get()); |
86 | 716 | m_controller->deliverKeyboardEvent(m_window, ev1); | ||
87 | 717 | } else { | ||
88 | 718 | // don't send a release event for a key for which we did not send a press in the first place | ||
89 | 719 | } | ||
90 | 676 | } | 720 | } |
91 | 677 | 721 | ||
92 | 678 | void MirSurface::touchEvent(Qt::KeyboardModifiers mods, | 722 | void MirSurface::touchEvent(Qt::KeyboardModifiers mods, |
93 | @@ -1264,3 +1308,49 @@ | |||
94 | 1264 | QPoint point(m_surface->top_left().x.as_int(),m_surface->top_left().y.as_int()); | 1308 | QPoint point(m_surface->top_left().x.as_int(),m_surface->top_left().y.as_int()); |
95 | 1265 | setPosition(point); | 1309 | setPosition(point); |
96 | 1266 | } | 1310 | } |
97 | 1311 | |||
98 | 1312 | bool MirSurface::isKeyPressed(quint32 nativeVirtualKey) const | ||
99 | 1313 | { | ||
100 | 1314 | for (const auto &pressedKey : m_pressedKeys) { | ||
101 | 1315 | if (pressedKey.nativeVirtualKey == nativeVirtualKey) { | ||
102 | 1316 | return true; | ||
103 | 1317 | } | ||
104 | 1318 | } | ||
105 | 1319 | return false; | ||
106 | 1320 | } | ||
107 | 1321 | |||
108 | 1322 | void MirSurface::forgetPressedKey(quint32 nativeVirtualKey) | ||
109 | 1323 | { | ||
110 | 1324 | for (int i = 0; i < m_pressedKeys.count(); ++i) { | ||
111 | 1325 | if (m_pressedKeys[i].nativeVirtualKey == nativeVirtualKey) { | ||
112 | 1326 | m_pressedKeys.removeAt(i); | ||
113 | 1327 | return; | ||
114 | 1328 | } | ||
115 | 1329 | } | ||
116 | 1330 | } | ||
117 | 1331 | |||
118 | 1332 | void MirSurface::releaseAllPressedKeys() | ||
119 | 1333 | { | ||
120 | 1334 | for (auto &pressedKey : m_pressedKeys) { | ||
121 | 1335 | auto deltaMs = (ulong)(msecsSinceReference() - pressedKey.msecsSinceReference); | ||
122 | 1336 | ulong timestamp = pressedKey.timestamp + deltaMs; | ||
123 | 1337 | std::vector<uint8_t> cookie{}; | ||
124 | 1338 | |||
125 | 1339 | auto ev = mir::events::make_event(pressedKey.deviceId, | ||
126 | 1340 | uncompressTimestamp<qtmir::Timestamp>(qtmir::Timestamp(timestamp)), | ||
127 | 1341 | cookie, mir_keyboard_action_up, pressedKey.nativeVirtualKey, pressedKey.nativeScanCode, | ||
128 | 1342 | mir_input_event_modifier_none); | ||
129 | 1343 | |||
130 | 1344 | auto ev1 = reinterpret_cast<MirKeyboardEvent const*>(ev.get()); | ||
131 | 1345 | m_controller->deliverKeyboardEvent(m_window, ev1); | ||
132 | 1346 | } | ||
133 | 1347 | m_pressedKeys.clear(); | ||
134 | 1348 | } | ||
135 | 1349 | |||
136 | 1350 | MirSurface::PressedKey::PressedKey(QKeyEvent *qtEvent, qint64 msecsSinceReference) | ||
137 | 1351 | : nativeVirtualKey(qtEvent->nativeVirtualKey()) | ||
138 | 1352 | , nativeScanCode(qtEvent->nativeScanCode()) | ||
139 | 1353 | , timestamp(qtEvent->timestamp()) | ||
140 | 1354 | , msecsSinceReference(msecsSinceReference) | ||
141 | 1355 | { | ||
142 | 1356 | } | ||
143 | 1267 | 1357 | ||
144 | === modified file 'src/modules/Unity/Application/mirsurface.h' | |||
145 | --- src/modules/Unity/Application/mirsurface.h 2017-03-24 18:56:33 +0000 | |||
146 | +++ src/modules/Unity/Application/mirsurface.h 2017-03-24 18:56:33 +0000 | |||
147 | @@ -1,5 +1,5 @@ | |||
148 | 1 | /* | 1 | /* |
150 | 2 | * Copyright (C) 2015-2016 Canonical, Ltd. | 2 | * Copyright (C) 2015-2017 Canonical, Ltd. |
151 | 3 | * | 3 | * |
152 | 4 | * This program is free software: you can redistribute it and/or modify it under | 4 | * This program is free software: you can redistribute it and/or modify it under |
153 | 5 | * the terms of the GNU Lesser General Public License version 3, as published by | 5 | * the terms of the GNU Lesser General Public License version 3, as published by |
154 | @@ -29,6 +29,8 @@ | |||
155 | 29 | #include <QWeakPointer> | 29 | #include <QWeakPointer> |
156 | 30 | #include <QSet> | 30 | #include <QSet> |
157 | 31 | #include <QTimer> | 31 | #include <QTimer> |
158 | 32 | #include <QVector> | ||
159 | 33 | #include <QKeyEvent> | ||
160 | 32 | 34 | ||
161 | 33 | #include "mirbuffersgtexture.h" | 35 | #include "mirbuffersgtexture.h" |
162 | 34 | #include "windowcontrollerinterface.h" | 36 | #include "windowcontrollerinterface.h" |
163 | @@ -214,6 +216,11 @@ | |||
164 | 214 | QPoint convertLocalToDisplayCoords(const QPoint &localPos) const; | 216 | QPoint convertLocalToDisplayCoords(const QPoint &localPos) const; |
165 | 215 | void updatePosition(); | 217 | void updatePosition(); |
166 | 216 | 218 | ||
167 | 219 | // Handling of missing key release events from Qt | ||
168 | 220 | bool isKeyPressed(quint32 nativeVirtualKey) const; | ||
169 | 221 | void forgetPressedKey(quint32 nativeVirtualKey); | ||
170 | 222 | void releaseAllPressedKeys(); | ||
171 | 223 | |||
172 | 217 | const miral::Window m_window; | 224 | const miral::Window m_window; |
173 | 218 | const std::shared_ptr<ExtraWindowInfo> m_extraInfo; | 225 | const std::shared_ptr<ExtraWindowInfo> m_extraInfo; |
174 | 219 | QString m_name; | 226 | QString m_name; |
175 | @@ -281,6 +288,18 @@ | |||
176 | 281 | MirSurface *m_parentSurface; | 288 | MirSurface *m_parentSurface; |
177 | 282 | 289 | ||
178 | 283 | MirSurfaceListModel *m_childSurfaceList; | 290 | MirSurfaceListModel *m_childSurfaceList; |
179 | 291 | |||
180 | 292 | // Track all keys that we told our mir window are currently pressed | ||
181 | 293 | struct PressedKey { | ||
182 | 294 | PressedKey() {} | ||
183 | 295 | PressedKey(QKeyEvent *qtEvent, qint64 msecsSinceReference); | ||
184 | 296 | quint32 nativeVirtualKey{0}; | ||
185 | 297 | quint32 nativeScanCode{0}; | ||
186 | 298 | ulong timestamp{0}; | ||
187 | 299 | MirInputDeviceId deviceId{0}; | ||
188 | 300 | qint64 msecsSinceReference{0}; | ||
189 | 301 | }; | ||
190 | 302 | QVector<PressedKey> m_pressedKeys; | ||
191 | 284 | }; | 303 | }; |
192 | 285 | 304 | ||
193 | 286 | } // namespace qtmir | 305 | } // namespace qtmir |
194 | 287 | 306 | ||
195 | === modified file 'src/platforms/mirserver/eventbuilder.h' | |||
196 | --- src/platforms/mirserver/eventbuilder.h 2017-03-03 10:39:24 +0000 | |||
197 | +++ src/platforms/mirserver/eventbuilder.h 2017-03-24 18:56:33 +0000 | |||
198 | @@ -69,7 +69,6 @@ | |||
199 | 69 | const QList<QTouchEvent::TouchPoint> &qtTouchPoints, | 69 | const QList<QTouchEvent::TouchPoint> &qtTouchPoints, |
200 | 70 | Qt::TouchPointStates /* qtTouchPointStates */, | 70 | Qt::TouchPointStates /* qtTouchPointStates */, |
201 | 71 | ulong qtTimestamp); | 71 | ulong qtTimestamp); |
202 | 72 | private: | ||
203 | 73 | class EventInfo { | 72 | class EventInfo { |
204 | 74 | public: | 73 | public: |
205 | 75 | void store(const MirInputEvent *mirInputEvent, ulong qtTimestamp); | 74 | void store(const MirInputEvent *mirInputEvent, ulong qtTimestamp); |
206 | @@ -82,6 +81,7 @@ | |||
207 | 82 | 81 | ||
208 | 83 | EventInfo *findInfo(ulong qtTimestamp); | 82 | EventInfo *findInfo(ulong qtTimestamp); |
209 | 84 | 83 | ||
210 | 84 | private: | ||
211 | 85 | mir::EventUPtr makeMirEvent(QInputEvent *qtEvent, int x, int y, MirPointerButtons buttons); | 85 | mir::EventUPtr makeMirEvent(QInputEvent *qtEvent, int x, int y, MirPointerButtons buttons); |
212 | 86 | 86 | ||
213 | 87 | 87 |
FAILED: Continuous integration, rev:619 /unity8- jenkins. ubuntu. com/job/ lp-qtmir- ci/592/ /unity8- jenkins. ubuntu. com/job/ build/4555/ console /unity8- jenkins. ubuntu. com/job/ build-0- fetch/4583 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 4410/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= zesty/4410/ console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 4410/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= zesty/4410/ console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 4410/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= zesty/4410/ console
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild: /unity8- jenkins. ubuntu. com/job/ lp-qtmir- ci/592/ rebuild
https:/