Merge lp:~kdub/qtmir/mir-mac-compatibility into lp:qtmir

Proposed by Kevin DuBois
Status: Work in progress
Proposed branch: lp:~kdub/qtmir/mir-mac-compatibility
Merge into: lp:qtmir
Diff against target: 106 lines (+11/-11)
2 files modified
src/modules/Unity/Application/mirsurface.cpp (+4/-4)
tests/mirserver/QtEventFeeder/qteventfeeder_test.cpp (+7/-7)
To merge this branch: bzr merge lp:~kdub/qtmir/mir-mac-compatibility
Reviewer Review Type Date Requested Status
Mir development team Pending
Review via email: mp+270185@code.launchpad.net

Commit message

fix api break in event construction that accommodates mir's attestable timestamp support

Description of the change

fix api break in event construction that accommodates mir's attestable timestamp support

To post a comment you must log in.

Unmerged revisions

370. By Kevin DuBois

compatibility with mir mac input stamps

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/modules/Unity/Application/mirsurface.cpp'
2--- src/modules/Unity/Application/mirsurface.cpp 2015-08-26 11:38:50 +0000
3+++ src/modules/Unity/Application/mirsurface.cpp 2015-09-04 14:26:52 +0000
4@@ -62,7 +62,7 @@
5 if (qtEvent->buttons() & Qt::MidButton)
6 buttons |= mir_pointer_button_tertiary;
7
8- return mir::events::make_event(0 /*DeviceID */, timestamp, modifiers, action,
9+ return mir::events::make_event(0 /*DeviceID */, timestamp, 0, modifiers, action,
10 buttons, qtEvent->x(), qtEvent->y(), 0, 0);
11 }
12
13@@ -72,7 +72,7 @@
14
15 MirPointerButtons buttons = 0;
16
17- return mir::events::make_event(0 /*DeviceID */, timestamp, mir_input_event_modifier_none, action,
18+ return mir::events::make_event(0 /*DeviceID */, timestamp, 0, mir_input_event_modifier_none, action,
19 buttons, qtEvent->posF().x(), qtEvent->posF().y(), 0, 0);
20 }
21
22@@ -94,7 +94,7 @@
23 action = mir_keyboard_action_repeat;
24
25 return mir::events::make_event(0 /* DeviceID */, std::chrono::milliseconds(qtEvent->timestamp()),
26- action, qtEvent->nativeVirtualKey(),
27+ 0, action, qtEvent->nativeVirtualKey(),
28 qtEvent->nativeScanCode(),
29 qtEvent->nativeModifiers());
30 }
31@@ -105,7 +105,7 @@
32 ulong qtTimestamp)
33 {
34 auto modifiers = getMirModifiersFromQt(qmods);
35- auto ev = mir::events::make_event(0, std::chrono::milliseconds(qtTimestamp),
36+ auto ev = mir::events::make_event(0, std::chrono::milliseconds(qtTimestamp), 0,
37 modifiers);
38
39 for (int i = 0; i < qtTouchPoints.count(); ++i) {
40
41=== modified file 'tests/mirserver/QtEventFeeder/qteventfeeder_test.cpp'
42--- tests/mirserver/QtEventFeeder/qteventfeeder_test.cpp 2015-08-11 12:08:32 +0000
43+++ tests/mirserver/QtEventFeeder/qteventfeeder_test.cpp 2015-09-04 14:26:52 +0000
44@@ -117,7 +117,7 @@
45 Contains(AllOf(HasId(0),
46 IsPressed()))),_)).Times(1);
47
48- auto ev1 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(123), 0);
49+ auto ev1 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(123), 0, 0);
50 mev::add_touch(*ev1, 0 /* touch ID */, mir_touch_action_down, mir_touch_tooltype_unknown,
51 10, 10, 10 /* x, y, pressure */,
52 1, 1, 10 /* touch major, minor, size */);
53@@ -142,7 +142,7 @@
54 ),_)).Times(1);
55 }
56
57- auto ev2 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(125), 0);
58+ auto ev2 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(125), 0, 0);
59 mev::add_touch(*ev2, 1 /* touch ID */, mir_touch_action_down, mir_touch_tooltype_unknown,
60 20, 20, 10 /* x, y, pressure*/,
61 1, 1, 10 /* touch major, minor, size */);
62@@ -156,7 +156,7 @@
63
64 setIrrelevantMockWindowSystemExpectations();
65
66- auto ev1 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(123), 0);
67+ auto ev1 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(123), 0, 0);
68 mev::add_touch(*ev1, 0 /* touch ID */, mir_touch_action_down, mir_touch_tooltype_unknown,
69 10, 10, 10 /* x, y, pressure*/,
70 1, 1, 10 /* touch major, minor, size */);
71@@ -172,7 +172,7 @@
72
73 setIrrelevantMockWindowSystemExpectations();
74
75- auto ev2 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(124), 0);
76+ auto ev2 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(124), 0, 0);
77 mev::add_touch(*ev2, 0 /* touch ID */, mir_touch_action_change, mir_touch_tooltype_unknown,
78 10, 10, 10 /* x, y, pressure*/,
79 1, 1, 10 /* touch major, minor, size */);
80@@ -194,7 +194,7 @@
81 setIrrelevantMockWindowSystemExpectations();
82
83 // touch 0 disappeared and touch 2 got pressed
84- auto ev3 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(125), 0);
85+ auto ev3 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(125), 0, 0);
86 mev::add_touch(*ev3, 1 /* touch ID */, mir_touch_action_change, mir_touch_tooltype_unknown,
87 20, 20, 10 /* x, y, pressure*/,
88 1, 1, 10 /* touch major, minor, size */);
89@@ -234,7 +234,7 @@
90 Contains(AllOf(HasId(0),
91 IsPressed()))),_)).Times(1);
92
93- auto ev1 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(123), 0);
94+ auto ev1 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(123), 0, 0);
95 mev::add_touch(*ev1, /* touch ID */ 0, mir_touch_action_down, mir_touch_tooltype_unknown,
96 10, 10, 10, 1, 1, 10);
97 qtEventFeeder->dispatch(*ev1);
98@@ -247,7 +247,7 @@
99 Contains(AllOf(HasId(0), StateIsMoved()))
100 ),_)).Times(1);
101
102- auto ev2 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(123), 0);
103+ auto ev2 = mev::make_event(MirInputDeviceId(), std::chrono::milliseconds(123), 0, 0);
104 mev::add_touch(*ev2, /* touch ID */ 0, mir_touch_action_down, mir_touch_tooltype_unknown,
105 10, 10, 10, 1, 1, 10);
106 qtEventFeeder->dispatch(*ev2);

Subscribers

People subscribed via source and target branches