Merge lp:~alan-griffiths/qtmir/spike-using-WindowManager into lp:qtmir
- spike-using-WindowManager
- Merge into trunk
Proposed by
Alan Griffiths
Status: | Superseded |
---|---|
Proposed branch: | lp:~alan-griffiths/qtmir/spike-using-WindowManager |
Merge into: | lp:qtmir |
Prerequisite: | lp:~mir-team/qtmir/compatibility-with-mir-API-changes |
Diff against target: |
1248 lines (+288/-271) 23 files modified
src/common/debughelpers.cpp (+4/-4) src/modules/Unity/Application/application_manager.cpp (+2/-2) src/modules/Unity/Application/application_manager.h (+1/-1) src/modules/Unity/Application/mirsurfaceitem.cpp (+25/-25) src/modules/Unity/Application/mirsurfaceitem.h (+4/-3) src/modules/Unity/Application/mirsurfacemanager.cpp (+8/-9) src/modules/Unity/Application/mirsurfacemanager.h (+5/-5) src/modules/Unity/Application/sessionmanager.cpp (+0/-1) src/platforms/mirserver/CMakeLists.txt (+1/-1) src/platforms/mirserver/mirserver.cpp (+32/-50) src/platforms/mirserver/mirserver.h (+8/-7) src/platforms/mirserver/mirserverintegration.cpp (+8/-4) src/platforms/mirserver/mirwindowmanager.cpp (+69/-36) src/platforms/mirserver/mirwindowmanager.h (+31/-14) src/platforms/mirserver/nativeinterface.cpp (+7/-2) src/platforms/mirserver/nativeinterface.h (+1/-1) src/platforms/mirserver/qteventfeeder.cpp (+33/-33) src/platforms/mirserver/surfaceobserver.h (+2/-1) tests/mirserver/QtEventFeeder/qteventfeeder_test.cpp (+20/-52) tests/modules/MirSurfaceItem/mirsurfaceitem_test.cpp (+17/-17) tests/modules/common/mock_mir_session.h (+4/-0) tests/modules/common/mock_surface.h (+5/-1) tests/modules/common/qtmir_test.h (+1/-2) |
To merge this branch: | bzr merge lp:~alan-griffiths/qtmir/spike-using-WindowManager |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Mir development team | Pending | ||
Review via email: mp+254235@code.launchpad.net |
This proposal has been superseded by a proposal from 2015-04-01.
Commit message
Switch from subclassing mir::shell:
Description of the change
Switch from subclassing mir::shell:
Note this is proof-of-concept branch and I've yet to rebuild the stack and test it out.
To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : | # |
review:
Needs Fixing
(continuous-integration)
- 276. By Daniel van Vugt
-
Migrate to MirEvent 2.1 API, coming in Mir 0.13
- 277. By Daniel van Vugt
-
Update mock headers so they can build again, following racarr's
cursor BufferStream changes. - 278. By Daniel van Vugt
- 279. By Alan Griffiths
-
Mir 0.13.0 fixes
- 280. By Alan Griffiths
-
Workaround API that uses references to opaque types
- 281. By Alan Griffiths
-
libmircommon-dev dependency should be versioned
- 282. By Alan Griffiths
- 283. By Alan Griffiths
-
Very basic version of MirWindowManage
r::modify_ surface( )
Unmerged revisions
- 283. By Alan Griffiths
-
Very basic version of MirWindowManage
r::modify_ surface( ) - 282. By Alan Griffiths
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'src/common/debughelpers.cpp' | |||
2 | --- src/common/debughelpers.cpp 2015-02-19 23:03:14 +0000 | |||
3 | +++ src/common/debughelpers.cpp 2015-04-01 13:16:10 +0000 | |||
4 | @@ -176,14 +176,14 @@ | |||
5 | 176 | } | 176 | } |
6 | 177 | } | 177 | } |
7 | 178 | 178 | ||
9 | 179 | const char *mirTouchActionToStr(MirTouchInputEventTouchAction action) | 179 | const char *mirTouchActionToStr(MirTouchAction action) |
10 | 180 | { | 180 | { |
11 | 181 | switch (action) { | 181 | switch (action) { |
13 | 182 | case mir_touch_input_event_action_up: | 182 | case mir_touch_action_up: |
14 | 183 | return "up"; | 183 | return "up"; |
16 | 184 | case mir_touch_input_event_action_down: | 184 | case mir_touch_action_down: |
17 | 185 | return "down"; | 185 | return "down"; |
19 | 186 | case mir_touch_input_event_action_change: | 186 | case mir_touch_action_change: |
20 | 187 | return "change"; | 187 | return "change"; |
21 | 188 | default: | 188 | default: |
22 | 189 | return "???"; | 189 | return "???"; |
23 | 190 | 190 | ||
24 | === modified file 'src/modules/Unity/Application/application_manager.cpp' | |||
25 | --- src/modules/Unity/Application/application_manager.cpp 2015-04-01 13:16:09 +0000 | |||
26 | +++ src/modules/Unity/Application/application_manager.cpp 2015-04-01 13:16:10 +0000 | |||
27 | @@ -70,9 +70,9 @@ | |||
28 | 70 | //TODO: should use mir::graphics::Display::configuration | 70 | //TODO: should use mir::graphics::Display::configuration |
29 | 71 | mir::geometry::Rectangles view_area; | 71 | mir::geometry::Rectangles view_area; |
30 | 72 | mirServer->the_display()->for_each_display_sync_group( | 72 | mirServer->the_display()->for_each_display_sync_group( |
32 | 73 | [&view_area](mir::graphics::DisplaySyncGroup& group) { | 73 | [&view_area](mir::graphics::DisplaySyncGroup &group) { |
33 | 74 | group.for_each_display_buffer( | 74 | group.for_each_display_buffer( |
35 | 75 | [&view_area](const mir::graphics::DisplayBuffer & db) { | 75 | [&view_area](const mir::graphics::DisplayBuffer &db) { |
36 | 76 | view_area.add(db.view_area()); | 76 | view_area.add(db.view_area()); |
37 | 77 | }); | 77 | }); |
38 | 78 | }); | 78 | }); |
39 | 79 | 79 | ||
40 | === modified file 'src/modules/Unity/Application/application_manager.h' | |||
41 | --- src/modules/Unity/Application/application_manager.h 2015-01-09 11:23:34 +0000 | |||
42 | +++ src/modules/Unity/Application/application_manager.h 2015-04-01 13:16:10 +0000 | |||
43 | @@ -151,7 +151,7 @@ | |||
44 | 151 | 151 | ||
45 | 152 | Application* findApplicationWithPromptSession(const mir::scene::PromptSession* promptSession); | 152 | Application* findApplicationWithPromptSession(const mir::scene::PromptSession* promptSession); |
46 | 153 | 153 | ||
48 | 154 | QSharedPointer<MirServer> m_mirServer; | 154 | const QSharedPointer<MirServer> m_mirServer; |
49 | 155 | 155 | ||
50 | 156 | QList<Application*> m_applications; | 156 | QList<Application*> m_applications; |
51 | 157 | Application* m_focusedApplication; | 157 | Application* m_focusedApplication; |
52 | 158 | 158 | ||
53 | === modified file 'src/modules/Unity/Application/mirsurfaceitem.cpp' | |||
54 | --- src/modules/Unity/Application/mirsurfaceitem.cpp 2015-03-18 10:12:03 +0000 | |||
55 | +++ src/modules/Unity/Application/mirsurfaceitem.cpp 2015-04-01 13:16:10 +0000 | |||
56 | @@ -23,7 +23,6 @@ | |||
57 | 23 | #include "mirbuffersgtexture.h" | 23 | #include "mirbuffersgtexture.h" |
58 | 24 | #include "session.h" | 24 | #include "session.h" |
59 | 25 | #include "mirsurfaceitem.h" | 25 | #include "mirsurfaceitem.h" |
60 | 26 | #include "mirshell.h" | ||
61 | 27 | #include "logging.h" | 26 | #include "logging.h" |
62 | 28 | #include "ubuntukeyboardinfo.h" | 27 | #include "ubuntukeyboardinfo.h" |
63 | 29 | 28 | ||
64 | @@ -46,6 +45,7 @@ | |||
65 | 46 | // Mir | 45 | // Mir |
66 | 47 | #include <mir/geometry/rectangle.h> | 46 | #include <mir/geometry/rectangle.h> |
67 | 48 | #include <mir/events/event_builders.h> | 47 | #include <mir/events/event_builders.h> |
68 | 48 | #include <mir/shell/shell.h> | ||
69 | 49 | #include <mir_toolkit/event.h> | 49 | #include <mir_toolkit/event.h> |
70 | 50 | 50 | ||
71 | 51 | namespace mg = mir::graphics; | 51 | namespace mg = mir::graphics; |
72 | @@ -71,28 +71,28 @@ | |||
73 | 71 | return m_mods; | 71 | return m_mods; |
74 | 72 | } | 72 | } |
75 | 73 | 73 | ||
77 | 74 | mir::EventUPtr makeMirEvent(QMouseEvent *qtEvent, MirPointerInputEventAction action) | 74 | mir::EventUPtr makeMirEvent(QMouseEvent *qtEvent, MirPointerAction action) |
78 | 75 | { | 75 | { |
79 | 76 | auto timestamp = qtEvent->timestamp() * 1000000; | 76 | auto timestamp = qtEvent->timestamp() * 1000000; |
80 | 77 | auto modifiers = getMirModifiersFromQt(qtEvent->modifiers()); | 77 | auto modifiers = getMirModifiersFromQt(qtEvent->modifiers()); |
81 | 78 | 78 | ||
83 | 79 | std::vector<MirPointerInputEventButton> buttons; | 79 | std::vector<MirPointerButton> buttons; |
84 | 80 | if (qtEvent->buttons() & Qt::LeftButton) | 80 | if (qtEvent->buttons() & Qt::LeftButton) |
86 | 81 | buttons.push_back(mir_pointer_input_button_primary); | 81 | buttons.push_back(mir_pointer_button_primary); |
87 | 82 | if (qtEvent->buttons() & Qt::RightButton) | 82 | if (qtEvent->buttons() & Qt::RightButton) |
89 | 83 | buttons.push_back(mir_pointer_input_button_secondary); | 83 | buttons.push_back(mir_pointer_button_secondary); |
90 | 84 | if (qtEvent->buttons() & Qt::MidButton) | 84 | if (qtEvent->buttons() & Qt::MidButton) |
92 | 85 | buttons.push_back(mir_pointer_input_button_tertiary); | 85 | buttons.push_back(mir_pointer_button_tertiary); |
93 | 86 | 86 | ||
94 | 87 | return mir::events::make_event(0 /*DeviceID */, timestamp, modifiers, action, | 87 | return mir::events::make_event(0 /*DeviceID */, timestamp, modifiers, action, |
95 | 88 | buttons, qtEvent->x(), qtEvent->y(), 0, 0); | 88 | buttons, qtEvent->x(), qtEvent->y(), 0, 0); |
96 | 89 | } | 89 | } |
97 | 90 | 90 | ||
99 | 91 | mir::EventUPtr makeMirEvent(QHoverEvent *qtEvent, MirPointerInputEventAction action) | 91 | mir::EventUPtr makeMirEvent(QHoverEvent *qtEvent, MirPointerAction action) |
100 | 92 | { | 92 | { |
101 | 93 | auto timestamp = qtEvent->timestamp() * 1000000; | 93 | auto timestamp = qtEvent->timestamp() * 1000000; |
102 | 94 | 94 | ||
104 | 95 | std::vector<MirPointerInputEventButton> buttons; | 95 | std::vector<MirPointerButton> buttons; |
105 | 96 | 96 | ||
106 | 97 | return mir::events::make_event(0 /*DeviceID */, timestamp, mir_input_event_modifier_none, action, | 97 | return mir::events::make_event(0 /*DeviceID */, timestamp, mir_input_event_modifier_none, action, |
107 | 98 | buttons, qtEvent->posF().x(), qtEvent->posF().y(), 0, 0); | 98 | buttons, qtEvent->posF().x(), qtEvent->posF().y(), 0, 0); |
108 | @@ -100,20 +100,20 @@ | |||
109 | 100 | 100 | ||
110 | 101 | mir::EventUPtr makeMirEvent(QKeyEvent *qtEvent) | 101 | mir::EventUPtr makeMirEvent(QKeyEvent *qtEvent) |
111 | 102 | { | 102 | { |
113 | 103 | MirKeyInputEventAction action = mir_key_input_event_action_down; | 103 | MirKeyboardAction action = mir_keyboard_action_down; |
114 | 104 | switch (qtEvent->type()) | 104 | switch (qtEvent->type()) |
115 | 105 | { | 105 | { |
116 | 106 | case QEvent::KeyPress: | 106 | case QEvent::KeyPress: |
118 | 107 | action = mir_key_input_event_action_down; | 107 | action = mir_keyboard_action_down; |
119 | 108 | break; | 108 | break; |
120 | 109 | case QEvent::KeyRelease: | 109 | case QEvent::KeyRelease: |
122 | 110 | action = mir_key_input_event_action_up; | 110 | action = mir_keyboard_action_up; |
123 | 111 | break; | 111 | break; |
124 | 112 | default: | 112 | default: |
125 | 113 | break; | 113 | break; |
126 | 114 | } | 114 | } |
127 | 115 | if (qtEvent->isAutoRepeat()) | 115 | if (qtEvent->isAutoRepeat()) |
129 | 116 | action = mir_key_input_event_action_repeat; | 116 | action = mir_keyboard_action_repeat; |
130 | 117 | 117 | ||
131 | 118 | return mir::events::make_event(0 /* DeviceID */, qtEvent->timestamp() * 1000000, | 118 | return mir::events::make_event(0 /* DeviceID */, qtEvent->timestamp() * 1000000, |
132 | 119 | action, qtEvent->nativeVirtualKey(), | 119 | action, qtEvent->nativeVirtualKey(), |
133 | @@ -134,19 +134,19 @@ | |||
134 | 134 | auto touchPoint = qtTouchPoints.at(i); | 134 | auto touchPoint = qtTouchPoints.at(i); |
135 | 135 | auto id = touchPoint.id(); | 135 | auto id = touchPoint.id(); |
136 | 136 | 136 | ||
138 | 137 | MirTouchInputEventTouchAction action = mir_touch_input_event_action_change; | 137 | MirTouchAction action = mir_touch_action_change; |
139 | 138 | if (touchPoint.state() == Qt::TouchPointReleased) | 138 | if (touchPoint.state() == Qt::TouchPointReleased) |
140 | 139 | { | 139 | { |
142 | 140 | action = mir_touch_input_event_action_up; | 140 | action = mir_touch_action_up; |
143 | 141 | } | 141 | } |
144 | 142 | if (touchPoint.state() == Qt::TouchPointPressed) | 142 | if (touchPoint.state() == Qt::TouchPointPressed) |
145 | 143 | { | 143 | { |
147 | 144 | action = mir_touch_input_event_action_down; | 144 | action = mir_touch_action_down; |
148 | 145 | } | 145 | } |
149 | 146 | 146 | ||
151 | 147 | MirTouchInputEventTouchTooltype tooltype = mir_touch_input_tool_type_finger; | 147 | MirTouchTooltype tooltype = mir_touch_tooltype_finger; |
152 | 148 | if (touchPoint.flags() & QTouchEvent::TouchPoint::Pen) | 148 | if (touchPoint.flags() & QTouchEvent::TouchPoint::Pen) |
154 | 149 | tooltype = mir_touch_input_tool_type_stylus; | 149 | tooltype = mir_touch_tooltype_stylus; |
155 | 150 | 150 | ||
156 | 151 | mir::events::add_touch(*ev, id, action, tooltype, | 151 | mir::events::add_touch(*ev, id, action, tooltype, |
157 | 152 | touchPoint.pos().x(), touchPoint.pos().y(), | 152 | touchPoint.pos().x(), touchPoint.pos().y(), |
158 | @@ -187,7 +187,7 @@ | |||
159 | 187 | 187 | ||
160 | 188 | MirSurfaceItem::MirSurfaceItem(std::shared_ptr<mir::scene::Surface> surface, | 188 | MirSurfaceItem::MirSurfaceItem(std::shared_ptr<mir::scene::Surface> surface, |
161 | 189 | SessionInterface* session, | 189 | SessionInterface* session, |
163 | 190 | MirShell *shell, | 190 | mir::shell::Shell *shell, |
164 | 191 | std::shared_ptr<SurfaceObserver> observer, | 191 | std::shared_ptr<SurfaceObserver> observer, |
165 | 192 | QQuickItem *parent) | 192 | QQuickItem *parent) |
166 | 193 | : QQuickItem(parent) | 193 | : QQuickItem(parent) |
167 | @@ -465,14 +465,14 @@ | |||
168 | 465 | if (type() == InputMethod) { | 465 | if (type() == InputMethod) { |
169 | 466 | // FIXME: Hack to get the VKB use case working while we don't have the proper solution in place. | 466 | // FIXME: Hack to get the VKB use case working while we don't have the proper solution in place. |
170 | 467 | if (isMouseInsideUbuntuKeyboard(event)) { | 467 | if (isMouseInsideUbuntuKeyboard(event)) { |
172 | 468 | auto ev = makeMirEvent(event, mir_pointer_input_event_action_button_down); | 468 | auto ev = makeMirEvent(event, mir_pointer_action_button_down); |
173 | 469 | m_surface->consume(*ev); | 469 | m_surface->consume(*ev); |
174 | 470 | event->accept(); | 470 | event->accept(); |
175 | 471 | } else { | 471 | } else { |
176 | 472 | event->ignore(); | 472 | event->ignore(); |
177 | 473 | } | 473 | } |
178 | 474 | } else { | 474 | } else { |
180 | 475 | auto ev = makeMirEvent(event, mir_pointer_input_event_action_button_down); | 475 | auto ev = makeMirEvent(event, mir_pointer_action_button_down); |
181 | 476 | m_surface->consume(*ev); | 476 | m_surface->consume(*ev); |
182 | 477 | event->accept(); | 477 | event->accept(); |
183 | 478 | } | 478 | } |
184 | @@ -480,14 +480,14 @@ | |||
185 | 480 | 480 | ||
186 | 481 | void MirSurfaceItem::mouseMoveEvent(QMouseEvent *event) | 481 | void MirSurfaceItem::mouseMoveEvent(QMouseEvent *event) |
187 | 482 | { | 482 | { |
189 | 483 | auto ev = makeMirEvent(event, mir_pointer_input_event_action_motion); | 483 | auto ev = makeMirEvent(event, mir_pointer_action_motion); |
190 | 484 | m_surface->consume(*ev); | 484 | m_surface->consume(*ev); |
191 | 485 | event->accept(); | 485 | event->accept(); |
192 | 486 | } | 486 | } |
193 | 487 | 487 | ||
194 | 488 | void MirSurfaceItem::mouseReleaseEvent(QMouseEvent *event) | 488 | void MirSurfaceItem::mouseReleaseEvent(QMouseEvent *event) |
195 | 489 | { | 489 | { |
197 | 490 | auto ev = makeMirEvent(event, mir_pointer_input_event_action_button_up); | 490 | auto ev = makeMirEvent(event, mir_pointer_action_button_up); |
198 | 491 | m_surface->consume(*ev); | 491 | m_surface->consume(*ev); |
199 | 492 | event->accept(); | 492 | event->accept(); |
200 | 493 | } | 493 | } |
201 | @@ -499,21 +499,21 @@ | |||
202 | 499 | 499 | ||
203 | 500 | void MirSurfaceItem::hoverEnterEvent(QHoverEvent *event) | 500 | void MirSurfaceItem::hoverEnterEvent(QHoverEvent *event) |
204 | 501 | { | 501 | { |
206 | 502 | auto ev = makeMirEvent(event, mir_pointer_input_event_action_enter); | 502 | auto ev = makeMirEvent(event, mir_pointer_action_enter); |
207 | 503 | m_surface->consume(*ev); | 503 | m_surface->consume(*ev); |
208 | 504 | event->accept(); | 504 | event->accept(); |
209 | 505 | } | 505 | } |
210 | 506 | 506 | ||
211 | 507 | void MirSurfaceItem::hoverLeaveEvent(QHoverEvent *event) | 507 | void MirSurfaceItem::hoverLeaveEvent(QHoverEvent *event) |
212 | 508 | { | 508 | { |
214 | 509 | auto ev = makeMirEvent(event, mir_pointer_input_event_action_leave); | 509 | auto ev = makeMirEvent(event, mir_pointer_action_leave); |
215 | 510 | m_surface->consume(*ev); | 510 | m_surface->consume(*ev); |
216 | 511 | event->accept(); | 511 | event->accept(); |
217 | 512 | } | 512 | } |
218 | 513 | 513 | ||
219 | 514 | void MirSurfaceItem::hoverMoveEvent(QHoverEvent *event) | 514 | void MirSurfaceItem::hoverMoveEvent(QHoverEvent *event) |
220 | 515 | { | 515 | { |
222 | 516 | auto ev = makeMirEvent(event, mir_pointer_input_event_action_motion); | 516 | auto ev = makeMirEvent(event, mir_pointer_action_motion); |
223 | 517 | m_surface->consume(*ev); | 517 | m_surface->consume(*ev); |
224 | 518 | event->accept(); | 518 | event->accept(); |
225 | 519 | } | 519 | } |
226 | 520 | 520 | ||
227 | === modified file 'src/modules/Unity/Application/mirsurfaceitem.h' | |||
228 | --- src/modules/Unity/Application/mirsurfaceitem.h 2015-02-20 15:52:17 +0000 | |||
229 | +++ src/modules/Unity/Application/mirsurfaceitem.h 2015-04-01 13:16:10 +0000 | |||
230 | @@ -33,8 +33,9 @@ | |||
231 | 33 | 33 | ||
232 | 34 | #include "session_interface.h" | 34 | #include "session_interface.h" |
233 | 35 | 35 | ||
234 | 36 | namespace mir { namespace shell { class Shell; } } | ||
235 | 37 | |||
236 | 36 | class SurfaceObserver; | 38 | class SurfaceObserver; |
237 | 37 | class MirShell; | ||
238 | 38 | 39 | ||
239 | 39 | namespace qtmir { | 40 | namespace qtmir { |
240 | 40 | 41 | ||
241 | @@ -58,7 +59,7 @@ | |||
242 | 58 | public: | 59 | public: |
243 | 59 | explicit MirSurfaceItem(std::shared_ptr<mir::scene::Surface> surface, | 60 | explicit MirSurfaceItem(std::shared_ptr<mir::scene::Surface> surface, |
244 | 60 | SessionInterface* session, | 61 | SessionInterface* session, |
246 | 61 | MirShell *shell, | 62 | mir::shell::Shell *shell, |
247 | 62 | std::shared_ptr<SurfaceObserver> observer, | 63 | std::shared_ptr<SurfaceObserver> observer, |
248 | 63 | QQuickItem *parent = 0); | 64 | QQuickItem *parent = 0); |
249 | 64 | ~MirSurfaceItem(); | 65 | ~MirSurfaceItem(); |
250 | @@ -179,7 +180,7 @@ | |||
251 | 179 | 180 | ||
252 | 180 | std::shared_ptr<mir::scene::Surface> m_surface; | 181 | std::shared_ptr<mir::scene::Surface> m_surface; |
253 | 181 | QPointer<SessionInterface> m_session; | 182 | QPointer<SessionInterface> m_session; |
255 | 182 | MirShell *const m_shell; | 183 | mir::shell::Shell *const m_shell; |
256 | 183 | bool m_firstFrameDrawn; | 184 | bool m_firstFrameDrawn; |
257 | 184 | bool m_live; | 185 | bool m_live; |
258 | 185 | Qt::ScreenOrientation m_orientation; //FIXME - have to save the state as Mir has no getter for it (bug:1357429) | 186 | Qt::ScreenOrientation m_orientation; //FIXME - have to save the state as Mir has no getter for it (bug:1357429) |
259 | 186 | 187 | ||
260 | === modified file 'src/modules/Unity/Application/mirsurfacemanager.cpp' | |||
261 | --- src/modules/Unity/Application/mirsurfacemanager.cpp 2015-02-06 09:47:21 +0000 | |||
262 | +++ src/modules/Unity/Application/mirsurfacemanager.cpp 2015-04-01 13:16:10 +0000 | |||
263 | @@ -31,7 +31,7 @@ | |||
264 | 31 | #include "nativeinterface.h" | 31 | #include "nativeinterface.h" |
265 | 32 | #include "mirserver.h" | 32 | #include "mirserver.h" |
266 | 33 | #include "sessionlistener.h" | 33 | #include "sessionlistener.h" |
268 | 34 | #include "mirshell.h" | 34 | #include "mirwindowmanager.h" |
269 | 35 | #include "logging.h" | 35 | #include "logging.h" |
270 | 36 | 36 | ||
271 | 37 | Q_LOGGING_CATEGORY(QTMIR_SURFACES, "qtmir.surfaces") | 37 | Q_LOGGING_CATEGORY(QTMIR_SURFACES, "qtmir.surfaces") |
272 | @@ -51,9 +51,9 @@ | |||
273 | 51 | manager, &MirSurfaceManager::onSessionDestroyingSurface); | 51 | manager, &MirSurfaceManager::onSessionDestroyingSurface); |
274 | 52 | } | 52 | } |
275 | 53 | 53 | ||
277 | 54 | void connectToShell(MirSurfaceManager *manager, MirShell *shell) | 54 | void connectToWindowManager(MirSurfaceManager *manager, MirWindowManager *windowManager) |
278 | 55 | { | 55 | { |
280 | 56 | QObject::connect(shell, &MirShell::surfaceAttributeChanged, | 56 | QObject::connect(windowManager, &MirWindowManager::surfaceAttributeChanged, |
281 | 57 | manager, &MirSurfaceManager::onSurfaceAttributeChanged); | 57 | manager, &MirSurfaceManager::onSurfaceAttributeChanged); |
282 | 58 | } | 58 | } |
283 | 59 | 59 | ||
284 | @@ -70,23 +70,22 @@ | |||
285 | 70 | } | 70 | } |
286 | 71 | 71 | ||
287 | 72 | SessionListener *sessionListener = static_cast<SessionListener*>(nativeInterface->nativeResourceForIntegration("SessionListener")); | 72 | SessionListener *sessionListener = static_cast<SessionListener*>(nativeInterface->nativeResourceForIntegration("SessionListener")); |
289 | 73 | MirShell *shell = static_cast<MirShell*>(nativeInterface->nativeResourceForIntegration("Shell")); | 73 | MirWindowManager *window_manager = static_cast<MirWindowManager*>(nativeInterface->nativeResourceForIntegration("WindowManager")); |
290 | 74 | mir::shell::Shell *const shell = static_cast<mir::shell::Shell*>(nativeInterface->nativeResourceForIntegration("mir::shell::Shell")); | ||
291 | 74 | 75 | ||
293 | 75 | the_surface_manager = new MirSurfaceManager(nativeInterface->m_mirServer, shell, SessionManager::singleton()); | 76 | the_surface_manager = new MirSurfaceManager(shell, SessionManager::singleton()); |
294 | 76 | 77 | ||
295 | 77 | connectToSessionListener(the_surface_manager, sessionListener); | 78 | connectToSessionListener(the_surface_manager, sessionListener); |
297 | 78 | connectToShell(the_surface_manager, shell); | 79 | connectToWindowManager(the_surface_manager, window_manager); |
298 | 79 | } | 80 | } |
299 | 80 | return the_surface_manager; | 81 | return the_surface_manager; |
300 | 81 | } | 82 | } |
301 | 82 | 83 | ||
302 | 83 | MirSurfaceManager::MirSurfaceManager( | 84 | MirSurfaceManager::MirSurfaceManager( |
305 | 84 | const QSharedPointer<MirServer>& mirServer, | 85 | mir::shell::Shell *shell, |
304 | 85 | MirShell *shell, | ||
306 | 86 | SessionManager* sessionManager, | 86 | SessionManager* sessionManager, |
307 | 87 | QObject *parent) | 87 | QObject *parent) |
308 | 88 | : MirSurfaceItemModel(parent) | 88 | : MirSurfaceItemModel(parent) |
309 | 89 | , m_mirServer(mirServer) | ||
310 | 90 | , m_shell(shell) | 89 | , m_shell(shell) |
311 | 91 | , m_sessionManager(sessionManager) | 90 | , m_sessionManager(sessionManager) |
312 | 92 | { | 91 | { |
313 | 93 | 92 | ||
314 | === modified file 'src/modules/Unity/Application/mirsurfacemanager.h' | |||
315 | --- src/modules/Unity/Application/mirsurfacemanager.h 2015-02-06 09:47:21 +0000 | |||
316 | +++ src/modules/Unity/Application/mirsurfacemanager.h 2015-04-01 13:16:10 +0000 | |||
317 | @@ -37,10 +37,12 @@ | |||
318 | 37 | class Session; | 37 | class Session; |
319 | 38 | class PromptSession; | 38 | class PromptSession; |
320 | 39 | } | 39 | } |
321 | 40 | namespace shell { | ||
322 | 41 | class Shell; | ||
323 | 42 | } | ||
324 | 40 | } | 43 | } |
325 | 41 | 44 | ||
326 | 42 | class MirServer; | 45 | class MirServer; |
327 | 43 | class MirShell; | ||
328 | 44 | 46 | ||
329 | 45 | namespace qtmir { | 47 | namespace qtmir { |
330 | 46 | 48 | ||
331 | @@ -54,8 +56,7 @@ | |||
332 | 54 | 56 | ||
333 | 55 | public: | 57 | public: |
334 | 56 | explicit MirSurfaceManager( | 58 | explicit MirSurfaceManager( |
337 | 57 | const QSharedPointer<MirServer>& mirServer, | 59 | mir::shell::Shell *shell, |
336 | 58 | MirShell *shell, | ||
338 | 59 | SessionManager* sessionManager, | 60 | SessionManager* sessionManager, |
339 | 60 | QObject *parent = 0 | 61 | QObject *parent = 0 |
340 | 61 | ); | 62 | ); |
341 | @@ -81,8 +82,7 @@ | |||
342 | 81 | QMutex m_mutex; | 82 | QMutex m_mutex; |
343 | 82 | 83 | ||
344 | 83 | private: | 84 | private: |
347 | 84 | QSharedPointer<MirServer> m_mirServer; | 85 | mir::shell::Shell *const m_shell; |
346 | 85 | MirShell *const m_shell; | ||
348 | 86 | SessionManager* m_sessionManager; | 86 | SessionManager* m_sessionManager; |
349 | 87 | static MirSurfaceManager *the_surface_manager; | 87 | static MirSurfaceManager *the_surface_manager; |
350 | 88 | }; | 88 | }; |
351 | 89 | 89 | ||
352 | === modified file 'src/modules/Unity/Application/sessionmanager.cpp' | |||
353 | --- src/modules/Unity/Application/sessionmanager.cpp 2015-01-28 14:25:36 +0000 | |||
354 | +++ src/modules/Unity/Application/sessionmanager.cpp 2015-04-01 13:16:10 +0000 | |||
355 | @@ -26,7 +26,6 @@ | |||
356 | 26 | #include "nativeinterface.h" | 26 | #include "nativeinterface.h" |
357 | 27 | #include "mirserver.h" | 27 | #include "mirserver.h" |
358 | 28 | #include "sessionlistener.h" | 28 | #include "sessionlistener.h" |
359 | 29 | #include "mirshell.h" | ||
360 | 30 | #include "logging.h" | 29 | #include "logging.h" |
361 | 31 | #include "promptsessionlistener.h" | 30 | #include "promptsessionlistener.h" |
362 | 32 | 31 | ||
363 | 33 | 32 | ||
364 | === modified file 'src/platforms/mirserver/CMakeLists.txt' | |||
365 | --- src/platforms/mirserver/CMakeLists.txt 2015-04-01 13:16:09 +0000 | |||
366 | +++ src/platforms/mirserver/CMakeLists.txt 2015-04-01 13:16:10 +0000 | |||
367 | @@ -37,7 +37,7 @@ | |||
368 | 37 | 37 | ||
369 | 38 | set(MIRSERVER_QPA_PLUGIN_SRC | 38 | set(MIRSERVER_QPA_PLUGIN_SRC |
370 | 39 | ../../common/debughelpers.cpp | 39 | ../../common/debughelpers.cpp |
372 | 40 | mirshell.cpp | 40 | mirwindowmanager.cpp |
373 | 41 | qteventfeeder.cpp | 41 | qteventfeeder.cpp |
374 | 42 | plugin.cpp | 42 | plugin.cpp |
375 | 43 | qmirserver.cpp | 43 | qmirserver.cpp |
376 | 44 | 44 | ||
377 | === modified file 'src/platforms/mirserver/mirserver.cpp' | |||
378 | --- src/platforms/mirserver/mirserver.cpp 2015-02-09 16:28:40 +0000 | |||
379 | +++ src/platforms/mirserver/mirserver.cpp 2015-04-01 13:16:10 +0000 | |||
380 | @@ -1,5 +1,5 @@ | |||
381 | 1 | /* | 1 | /* |
383 | 2 | * Copyright (C) 2013-2014 Canonical, Ltd. | 2 | * Copyright (C) 2013-2015 Canonical, Ltd. |
384 | 3 | * | 3 | * |
385 | 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 |
386 | 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 |
387 | @@ -19,7 +19,7 @@ | |||
388 | 19 | #include "mirserver.h" | 19 | #include "mirserver.h" |
389 | 20 | 20 | ||
390 | 21 | // local | 21 | // local |
392 | 22 | #include "mirshell.h" | 22 | #include "mirwindowmanager.h" |
393 | 23 | #include "mirglconfig.h" | 23 | #include "mirglconfig.h" |
394 | 24 | #include "mirserverstatuslistener.h" | 24 | #include "mirserverstatuslistener.h" |
395 | 25 | #include "promptsessionlistener.h" | 25 | #include "promptsessionlistener.h" |
396 | @@ -51,19 +51,25 @@ | |||
397 | 51 | set_command_line_handler(&ignore_unparsed_arguments); | 51 | set_command_line_handler(&ignore_unparsed_arguments); |
398 | 52 | set_command_line(argc, argv); | 52 | set_command_line(argc, argv); |
399 | 53 | 53 | ||
413 | 54 | override_the_session_listener([] | 54 | override_the_session_listener([this] |
414 | 55 | { | 55 | { |
415 | 56 | return std::make_shared<SessionListener>(); | 56 | const auto result = std::make_shared<SessionListener>(); |
416 | 57 | }); | 57 | m_sessionListener = result; |
417 | 58 | 58 | return result; | |
418 | 59 | override_the_prompt_session_listener([] | 59 | }); |
419 | 60 | { | 60 | |
420 | 61 | return std::make_shared<PromptSessionListener>(); | 61 | override_the_prompt_session_listener([this] |
421 | 62 | }); | 62 | { |
422 | 63 | 63 | const auto result = std::make_shared<PromptSessionListener>(); | |
423 | 64 | override_the_session_authorizer([] | 64 | m_promptSessionListener = result; |
424 | 65 | { | 65 | return result; |
425 | 66 | return std::make_shared<SessionAuthorizer>(); | 66 | }); |
426 | 67 | |||
427 | 68 | override_the_session_authorizer([this] | ||
428 | 69 | { | ||
429 | 70 | const auto result = std::make_shared<SessionAuthorizer>(); | ||
430 | 71 | m_sessionAuthorizer = result; | ||
431 | 72 | return result; | ||
432 | 67 | }); | 73 | }); |
433 | 68 | 74 | ||
434 | 69 | override_the_compositor([] | 75 | override_the_compositor([] |
435 | @@ -86,17 +92,11 @@ | |||
436 | 86 | return std::make_shared<MirServerStatusListener>(); | 92 | return std::make_shared<MirServerStatusListener>(); |
437 | 87 | }); | 93 | }); |
438 | 88 | 94 | ||
440 | 89 | override_the_shell([this] | 95 | override_the_window_manager_builder([this](mir::shell::FocusController*) |
441 | 90 | { | 96 | { |
451 | 91 | auto const shell = std::make_shared<MirShell>( | 97 | const auto result = std::make_shared<MirWindowManager>(the_shell_display_layout()); |
452 | 92 | the_input_targeter(), | 98 | m_windowManager = result; |
453 | 93 | the_surface_coordinator(), | 99 | return result; |
445 | 94 | the_session_coordinator(), | ||
446 | 95 | the_prompt_session_manager(), | ||
447 | 96 | the_shell_display_layout()); | ||
448 | 97 | |||
449 | 98 | m_shell = shell; | ||
450 | 99 | return shell; | ||
454 | 100 | }); | 100 | }); |
455 | 101 | 101 | ||
456 | 102 | set_terminator([&](int) | 102 | set_terminator([&](int) |
457 | @@ -113,43 +113,25 @@ | |||
458 | 113 | 113 | ||
459 | 114 | /************************************ Shell side ************************************/ | 114 | /************************************ Shell side ************************************/ |
460 | 115 | 115 | ||
472 | 116 | // | 116 | // Note about the"weak_ptr<X>.lock().get();" constructs used in the functions below. |
473 | 117 | // Note about the | 117 | // An empty weak_ptr<> means that Mir is not holding the pointer so we return nullptr. |
463 | 118 | // if (sharedPtr.unique()) return 0; | ||
464 | 119 | // constructs used in the functions below. | ||
465 | 120 | // The rationale is that if when you do | ||
466 | 121 | // the_session_authorizer() | ||
467 | 122 | // get a pointer that is unique means that Mir is not | ||
468 | 123 | // holding the pointer and thus when we return from the | ||
469 | 124 | // sessionAuthorizer() | ||
470 | 125 | // scope the unique pointer will be destroyed so we return 0 | ||
471 | 126 | // | ||
474 | 127 | 118 | ||
475 | 128 | SessionAuthorizer *MirServer::sessionAuthorizer() | 119 | SessionAuthorizer *MirServer::sessionAuthorizer() |
476 | 129 | { | 120 | { |
481 | 130 | auto sharedPtr = the_session_authorizer(); | 121 | return m_sessionAuthorizer.lock().get(); |
478 | 131 | if (sharedPtr.unique()) return 0; | ||
479 | 132 | |||
480 | 133 | return static_cast<SessionAuthorizer*>(sharedPtr.get()); | ||
482 | 134 | } | 122 | } |
483 | 135 | 123 | ||
484 | 136 | SessionListener *MirServer::sessionListener() | 124 | SessionListener *MirServer::sessionListener() |
485 | 137 | { | 125 | { |
490 | 138 | auto sharedPtr = the_session_listener(); | 126 | return m_sessionListener.lock().get(); |
487 | 139 | if (sharedPtr.unique()) return 0; | ||
488 | 140 | |||
489 | 141 | return static_cast<SessionListener*>(sharedPtr.get()); | ||
491 | 142 | } | 127 | } |
492 | 143 | 128 | ||
493 | 144 | PromptSessionListener *MirServer::promptSessionListener() | 129 | PromptSessionListener *MirServer::promptSessionListener() |
494 | 145 | { | 130 | { |
499 | 146 | auto sharedPtr = the_prompt_session_listener(); | 131 | return m_promptSessionListener.lock().get(); |
496 | 147 | if (sharedPtr.unique()) return 0; | ||
497 | 148 | |||
498 | 149 | return static_cast<PromptSessionListener*>(sharedPtr.get()); | ||
500 | 150 | } | 132 | } |
501 | 151 | 133 | ||
503 | 152 | MirShell *MirServer::shell() | 134 | MirWindowManager *MirServer::windowManager() |
504 | 153 | { | 135 | { |
506 | 154 | return m_shell.lock().get(); | 136 | return m_windowManager.lock().get(); |
507 | 155 | } | 137 | } |
508 | 156 | 138 | ||
509 | === modified file 'src/platforms/mirserver/mirserver.h' | |||
510 | --- src/platforms/mirserver/mirserver.h 2015-04-01 13:16:09 +0000 | |||
511 | +++ src/platforms/mirserver/mirserver.h 2015-04-01 13:16:10 +0000 | |||
512 | @@ -23,7 +23,7 @@ | |||
513 | 23 | class QtEventFeeder; | 23 | class QtEventFeeder; |
514 | 24 | class SessionListener; | 24 | class SessionListener; |
515 | 25 | class SessionAuthorizer; | 25 | class SessionAuthorizer; |
517 | 26 | class MirShell; | 26 | class MirWindowManager; |
518 | 27 | class PromptSessionListener; | 27 | class PromptSessionListener; |
519 | 28 | 28 | ||
520 | 29 | // We use virtual inheritance of mir::Server to facilitate derived classes (e.g. testing) | 29 | // We use virtual inheritance of mir::Server to facilitate derived classes (e.g. testing) |
521 | @@ -34,7 +34,7 @@ | |||
522 | 34 | 34 | ||
523 | 35 | Q_PROPERTY(SessionAuthorizer* sessionAuthorizer READ sessionAuthorizer CONSTANT) | 35 | Q_PROPERTY(SessionAuthorizer* sessionAuthorizer READ sessionAuthorizer CONSTANT) |
524 | 36 | Q_PROPERTY(SessionListener* sessionListener READ sessionListener CONSTANT) | 36 | Q_PROPERTY(SessionListener* sessionListener READ sessionListener CONSTANT) |
526 | 37 | Q_PROPERTY(MirShell* shell READ shell CONSTANT) | 37 | Q_PROPERTY(MirWindowManager* windowManager READ windowManager CONSTANT) |
527 | 38 | Q_PROPERTY(PromptSessionListener* promptSessionListener READ promptSessionListener CONSTANT) | 38 | Q_PROPERTY(PromptSessionListener* promptSessionListener READ promptSessionListener CONSTANT) |
528 | 39 | 39 | ||
529 | 40 | public: | 40 | public: |
530 | @@ -47,21 +47,22 @@ | |||
531 | 47 | using mir::Server::the_display; | 47 | using mir::Server::the_display; |
532 | 48 | using mir::Server::the_gl_config; | 48 | using mir::Server::the_gl_config; |
533 | 49 | using mir::Server::the_main_loop; | 49 | using mir::Server::the_main_loop; |
534 | 50 | using mir::Server::the_prompt_session_listener; | ||
535 | 51 | using mir::Server::the_prompt_session_manager; | 50 | using mir::Server::the_prompt_session_manager; |
538 | 52 | using mir::Server::the_session_authorizer; | 51 | using mir::Server::the_shell; |
537 | 53 | using mir::Server::the_session_listener; | ||
539 | 54 | 52 | ||
540 | 55 | /* qt specific */ | 53 | /* qt specific */ |
541 | 56 | // getters | 54 | // getters |
542 | 57 | SessionAuthorizer *sessionAuthorizer(); | 55 | SessionAuthorizer *sessionAuthorizer(); |
543 | 58 | SessionListener *sessionListener(); | 56 | SessionListener *sessionListener(); |
544 | 59 | PromptSessionListener *promptSessionListener(); | 57 | PromptSessionListener *promptSessionListener(); |
546 | 60 | MirShell *shell(); | 58 | MirWindowManager *windowManager(); |
547 | 61 | 59 | ||
548 | 62 | private: | 60 | private: |
549 | 63 | std::shared_ptr<QtEventFeeder> m_qtEventFeeder; | 61 | std::shared_ptr<QtEventFeeder> m_qtEventFeeder; |
551 | 64 | std::weak_ptr<MirShell> m_shell; | 62 | std::weak_ptr<SessionAuthorizer> m_sessionAuthorizer; |
552 | 63 | std::weak_ptr<SessionListener> m_sessionListener; | ||
553 | 64 | std::weak_ptr<PromptSessionListener> m_promptSessionListener; | ||
554 | 65 | std::weak_ptr<MirWindowManager> m_windowManager; | ||
555 | 65 | }; | 66 | }; |
556 | 66 | 67 | ||
557 | 67 | #endif // MIRSERVER_H | 68 | #endif // MIRSERVER_H |
558 | 68 | 69 | ||
559 | === modified file 'src/platforms/mirserver/mirserverintegration.cpp' | |||
560 | --- src/platforms/mirserver/mirserverintegration.cpp 2015-04-01 13:16:09 +0000 | |||
561 | +++ src/platforms/mirserver/mirserverintegration.cpp 2015-04-01 13:16:10 +0000 | |||
562 | @@ -137,10 +137,14 @@ | |||
563 | 137 | 137 | ||
564 | 138 | mg::DisplayBuffer* first_buffer{nullptr}; | 138 | mg::DisplayBuffer* first_buffer{nullptr}; |
565 | 139 | mg::DisplaySyncGroup* first_group{nullptr}; | 139 | mg::DisplaySyncGroup* first_group{nullptr}; |
570 | 140 | m_mirServer->the_display()->for_each_display_sync_group([&](mg::DisplaySyncGroup& group) { | 140 | m_mirServer->the_display()->for_each_display_sync_group([&](mg::DisplaySyncGroup &group) { |
571 | 141 | if (!first_group) first_group = &group; | 141 | if (!first_group) { |
572 | 142 | group.for_each_display_buffer([&](mg::DisplayBuffer& buffer) { | 142 | first_group = &group; |
573 | 143 | if (!first_buffer) first_buffer = &buffer; | 143 | } |
574 | 144 | group.for_each_display_buffer([&](mg::DisplayBuffer &buffer) { | ||
575 | 145 | if (!first_buffer) { | ||
576 | 146 | first_buffer = &buffer; | ||
577 | 147 | } | ||
578 | 144 | }); | 148 | }); |
579 | 145 | }); | 149 | }); |
580 | 146 | 150 | ||
581 | 147 | 151 | ||
582 | === renamed file 'src/platforms/mirserver/mirshell.cpp' => 'src/platforms/mirserver/mirwindowmanager.cpp' | |||
583 | --- src/platforms/mirserver/mirshell.cpp 2015-04-01 13:16:09 +0000 | |||
584 | +++ src/platforms/mirserver/mirwindowmanager.cpp 2015-04-01 13:16:10 +0000 | |||
585 | @@ -14,64 +14,97 @@ | |||
586 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
587 | 15 | */ | 15 | */ |
588 | 16 | 16 | ||
590 | 17 | #include "mirshell.h" | 17 | #include "mirwindowmanager.h" |
591 | 18 | #include "logging.h" | 18 | #include "logging.h" |
592 | 19 | #include "tracepoints.h" // generated from tracepoints.tp | 19 | #include "tracepoints.h" // generated from tracepoints.tp |
593 | 20 | 20 | ||
594 | 21 | #include <mir/geometry/rectangle.h> | 21 | #include <mir/geometry/rectangle.h> |
595 | 22 | #include <mir/scene/session.h> | 22 | #include <mir/scene/session.h> |
596 | 23 | #include <mir/scene/surface.h> | ||
597 | 23 | #include <mir/scene/surface_creation_parameters.h> | 24 | #include <mir/scene/surface_creation_parameters.h> |
598 | 24 | #include <mir/shell/display_layout.h> | 25 | #include <mir/shell/display_layout.h> |
599 | 25 | #include <mir/shell/null_window_manager.h> | 26 | #include <mir/shell/null_window_manager.h> |
600 | 26 | 27 | ||
601 | 27 | namespace ms = mir::scene; | 28 | namespace ms = mir::scene; |
602 | 28 | using mir::shell::AbstractShell; | ||
603 | 29 | 29 | ||
613 | 30 | MirShell::MirShell( | 30 | MirWindowManager::MirWindowManager(const std::shared_ptr<mir::shell::DisplayLayout> &displayLayout) : |
614 | 31 | const std::shared_ptr<mir::shell::InputTargeter> &inputTargeter, | 31 | m_displayLayout{displayLayout} |
606 | 32 | const std::shared_ptr<mir::scene::SurfaceCoordinator> &surfaceCoordinator, | ||
607 | 33 | const std::shared_ptr<mir::scene::SessionCoordinator> &sessionCoordinator, | ||
608 | 34 | const std::shared_ptr<mir::scene::PromptSessionManager> &promptSessionManager, | ||
609 | 35 | const std::shared_ptr<mir::shell::DisplayLayout> &displayLayout) : | ||
610 | 36 | AbstractShell(inputTargeter, surfaceCoordinator, sessionCoordinator, promptSessionManager, | ||
611 | 37 | [](mir::shell::FocusController*) { return std::make_shared<mir::shell::NullWindowManager>(); }), | ||
612 | 38 | m_displayLayout{displayLayout} | ||
615 | 39 | { | 32 | { |
617 | 40 | qCDebug(QTMIR_MIR_MESSAGES) << "MirShell::MirShell"; | 33 | qCDebug(QTMIR_MIR_MESSAGES) << "MirWindowManager::MirWindowManager"; |
618 | 41 | } | 34 | } |
619 | 42 | 35 | ||
621 | 43 | mir::frontend::SurfaceId MirShell::create_surface(const std::shared_ptr<ms::Session> &session, const ms::SurfaceCreationParameters &requestParameters) | 36 | auto MirWindowManager::add_surface( |
622 | 37 | std::shared_ptr<mir::scene::Session> const& session, | ||
623 | 38 | mir::scene::SurfaceCreationParameters const& requestParameters, | ||
624 | 39 | std::function<mir::frontend::SurfaceId(std::shared_ptr<mir::scene::Session> const& session, mir::scene::SurfaceCreationParameters const& params)> const& build) | ||
625 | 40 | -> mir::frontend::SurfaceId | ||
626 | 44 | { | 41 | { |
627 | 45 | tracepoint(qtmirserver, surfacePlacementStart); | 42 | tracepoint(qtmirserver, surfacePlacementStart); |
628 | 46 | 43 | ||
647 | 47 | // TODO: Callback unity8 so that it can make a decision on that. | 44 | // TODO: Callback unity8 so that it can make a decision on that. |
648 | 48 | // unity8 must bear in mind that the called function will be on a Mir thread though. | 45 | // unity8 must bear in mind that the called function will be on a Mir thread though. |
649 | 49 | // The QPA shouldn't be deciding for itself on such things. | 46 | // The QPA shouldn't be deciding for itself on such things. |
650 | 50 | 47 | ||
651 | 51 | ms::SurfaceCreationParameters placedParameters = requestParameters; | 48 | ms::SurfaceCreationParameters placedParameters = requestParameters; |
652 | 52 | 49 | ||
653 | 53 | // Just make it fullscreen for now | 50 | // Just make it fullscreen for now |
654 | 54 | mir::geometry::Rectangle rect{requestParameters.top_left, requestParameters.size}; | 51 | mir::geometry::Rectangle rect{requestParameters.top_left, requestParameters.size}; |
655 | 55 | m_displayLayout->size_to_output(rect); | 52 | m_displayLayout->size_to_output(rect); |
656 | 56 | placedParameters.size = rect.size; | 53 | placedParameters.size = rect.size; |
657 | 57 | 54 | ||
658 | 58 | qCDebug(QTMIR_MIR_MESSAGES) << "MirShell::create_surface(): size requested (" | 55 | qCDebug(QTMIR_MIR_MESSAGES) << "MirWindowManager::add_surface(): size requested (" |
659 | 59 | << requestParameters.size.width.as_int() << "," << requestParameters.size.height.as_int() << ") and placed (" | 56 | << requestParameters.size.width.as_int() << "," << requestParameters.size.height.as_int() << ") and placed (" |
660 | 60 | << placedParameters.size.width.as_int() << "," << placedParameters.size.height.as_int() << ")"; | 57 | << placedParameters.size.width.as_int() << "," << placedParameters.size.height.as_int() << ")"; |
661 | 61 | 58 | ||
662 | 62 | tracepoint(qtmirserver, surfacePlacementEnd); | 59 | tracepoint(qtmirserver, surfacePlacementEnd); |
663 | 63 | 60 | ||
664 | 64 | return AbstractShell::create_surface(session, placedParameters); | 61 | return build(session, placedParameters); |
665 | 65 | } | 62 | } |
666 | 66 | 63 | ||
670 | 67 | int MirShell::set_surface_attribute( | 64 | int MirWindowManager::set_surface_attribute( |
671 | 68 | const std::shared_ptr<mir::scene::Session> &session, | 65 | std::shared_ptr<mir::scene::Session> const& /*session*/, |
672 | 69 | const std::shared_ptr<mir::scene::Surface> &surface, | 66 | std::shared_ptr<mir::scene::Surface> const& surface, |
673 | 70 | MirSurfaceAttrib attrib, | 67 | MirSurfaceAttrib attrib, |
674 | 71 | int value) | 68 | int value) |
675 | 72 | { | 69 | { |
677 | 73 | auto const result = AbstractShell::set_surface_attribute(session, surface, attrib, value); | 70 | const auto result = surface->configure(attrib, value); |
678 | 74 | Q_EMIT surfaceAttributeChanged(surface.get(), attrib, result); | 71 | Q_EMIT surfaceAttributeChanged(surface.get(), attrib, result); |
679 | 75 | |||
680 | 76 | return result; | 72 | return result; |
681 | 77 | } | 73 | } |
682 | 74 | |||
683 | 75 | void MirWindowManager::add_session(std::shared_ptr<mir::scene::Session> const& /*session*/) | ||
684 | 76 | { | ||
685 | 77 | } | ||
686 | 78 | |||
687 | 79 | void MirWindowManager::remove_session(std::shared_ptr<mir::scene::Session> const& /*session*/) | ||
688 | 80 | { | ||
689 | 81 | } | ||
690 | 82 | |||
691 | 83 | void MirWindowManager::remove_surface( | ||
692 | 84 | std::shared_ptr<mir::scene::Session> const& /*session*/, | ||
693 | 85 | std::weak_ptr<mir::scene::Surface> const& /*surface*/) | ||
694 | 86 | { | ||
695 | 87 | } | ||
696 | 88 | |||
697 | 89 | void MirWindowManager::add_display(mir::geometry::Rectangle const& /*area*/) | ||
698 | 90 | { | ||
699 | 91 | } | ||
700 | 92 | |||
701 | 93 | void MirWindowManager::remove_display(mir::geometry::Rectangle const& /*area*/) | ||
702 | 94 | { | ||
703 | 95 | } | ||
704 | 96 | |||
705 | 97 | bool MirWindowManager::handle_key_event(MirKeyboardEvent const* /*event*/) | ||
706 | 98 | { | ||
707 | 99 | return false; | ||
708 | 100 | } | ||
709 | 101 | |||
710 | 102 | bool MirWindowManager::handle_touch_event(MirTouchEvent const* /*event*/) | ||
711 | 103 | { | ||
712 | 104 | return false; | ||
713 | 105 | } | ||
714 | 106 | |||
715 | 107 | bool MirWindowManager::handle_pointer_event(MirPointerEvent const* /*event*/) | ||
716 | 108 | { | ||
717 | 109 | return false; | ||
718 | 110 | } | ||
719 | 78 | 111 | ||
720 | === renamed file 'src/platforms/mirserver/mirshell.h' => 'src/platforms/mirserver/mirwindowmanager.h' | |||
721 | --- src/platforms/mirserver/mirshell.h 2015-02-04 17:17:53 +0000 | |||
722 | +++ src/platforms/mirserver/mirwindowmanager.h 2015-04-01 13:16:10 +0000 | |||
723 | @@ -14,10 +14,10 @@ | |||
724 | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
725 | 15 | */ | 15 | */ |
726 | 16 | 16 | ||
729 | 17 | #ifndef QPAMIRSERVER_SHELL_H | 17 | #ifndef MIRWINDOWMANAGER_H |
730 | 18 | #define QPAMIRSERVER_SHELL_H | 18 | #define MIRWINDOWMANAGER_H |
731 | 19 | 19 | ||
733 | 20 | #include <mir/shell/abstract_shell.h> | 20 | #include <mir/shell/window_manager.h> |
734 | 21 | #include <QObject> | 21 | #include <QObject> |
735 | 22 | 22 | ||
736 | 23 | namespace mir { | 23 | namespace mir { |
737 | @@ -26,26 +26,43 @@ | |||
738 | 26 | } | 26 | } |
739 | 27 | } | 27 | } |
740 | 28 | 28 | ||
742 | 29 | class MirShell : public QObject, public mir::shell::AbstractShell | 29 | class MirWindowManager : public QObject, public mir::shell::WindowManager |
743 | 30 | { | 30 | { |
744 | 31 | Q_OBJECT | 31 | Q_OBJECT |
745 | 32 | 32 | ||
746 | 33 | public: | 33 | public: |
753 | 34 | MirShell( | 34 | explicit MirWindowManager(const std::shared_ptr<mir::shell::DisplayLayout> &displayLayout); |
748 | 35 | const std::shared_ptr<mir::shell::InputTargeter> &inputTargeter, | ||
749 | 36 | const std::shared_ptr<mir::scene::SurfaceCoordinator> &surfaceCoordinator, | ||
750 | 37 | const std::shared_ptr<mir::scene::SessionCoordinator> &sessionCoordinator, | ||
751 | 38 | const std::shared_ptr<mir::scene::PromptSessionManager> &promptSessionManager, | ||
752 | 39 | const std::shared_ptr<mir::shell::DisplayLayout> &displayLayout); | ||
754 | 40 | 35 | ||
756 | 41 | virtual mir::frontend::SurfaceId create_surface(const std::shared_ptr<mir::scene::Session>& session, const mir::scene::SurfaceCreationParameters ¶ms); | 36 | auto add_surface( |
757 | 37 | std::shared_ptr<mir::scene::Session> const& session, | ||
758 | 38 | mir::scene::SurfaceCreationParameters const& params, | ||
759 | 39 | std::function<mir::frontend::SurfaceId(std::shared_ptr<mir::scene::Session> const& session, mir::scene::SurfaceCreationParameters const& params)> const& build) | ||
760 | 40 | -> mir::frontend::SurfaceId override; | ||
761 | 42 | 41 | ||
762 | 43 | int set_surface_attribute( | 42 | int set_surface_attribute( |
765 | 44 | const std::shared_ptr<mir::scene::Session> &session, | 43 | std::shared_ptr<mir::scene::Session> const& session, |
766 | 45 | const std::shared_ptr<mir::scene::Surface> &surface, | 44 | std::shared_ptr<mir::scene::Surface> const& surface, |
767 | 46 | MirSurfaceAttrib attrib, | 45 | MirSurfaceAttrib attrib, |
768 | 47 | int value) override; | 46 | int value) override; |
769 | 48 | 47 | ||
770 | 48 | void add_session(std::shared_ptr<mir::scene::Session> const& session) override; | ||
771 | 49 | |||
772 | 50 | void remove_session(std::shared_ptr<mir::scene::Session> const& session) override; | ||
773 | 51 | |||
774 | 52 | void remove_surface( | ||
775 | 53 | std::shared_ptr<mir::scene::Session> const& session, | ||
776 | 54 | std::weak_ptr<mir::scene::Surface> const& surface) override; | ||
777 | 55 | |||
778 | 56 | void add_display(mir::geometry::Rectangle const& area) override; | ||
779 | 57 | |||
780 | 58 | void remove_display(mir::geometry::Rectangle const& area) override; | ||
781 | 59 | |||
782 | 60 | bool handle_key_event(MirKeyboardEvent const* event) override; | ||
783 | 61 | |||
784 | 62 | bool handle_touch_event(MirTouchEvent const* event) override; | ||
785 | 63 | |||
786 | 64 | bool handle_pointer_event(MirPointerEvent const* event) override; | ||
787 | 65 | |||
788 | 49 | Q_SIGNALS: | 66 | Q_SIGNALS: |
789 | 50 | void surfaceAttributeChanged(mir::scene::Surface const*, const MirSurfaceAttrib, const int); | 67 | void surfaceAttributeChanged(mir::scene::Surface const*, const MirSurfaceAttrib, const int); |
790 | 51 | 68 | ||
791 | @@ -53,4 +70,4 @@ | |||
792 | 53 | std::shared_ptr<mir::shell::DisplayLayout> const m_displayLayout; | 70 | std::shared_ptr<mir::shell::DisplayLayout> const m_displayLayout; |
793 | 54 | }; | 71 | }; |
794 | 55 | 72 | ||
796 | 56 | #endif /* QPAMIRSERVER_SHELL_H */ | 73 | #endif /* MIRWINDOWMANAGER_H */ |
797 | 57 | 74 | ||
798 | === modified file 'src/platforms/mirserver/nativeinterface.cpp' | |||
799 | --- src/platforms/mirserver/nativeinterface.cpp 2015-01-28 14:25:36 +0000 | |||
800 | +++ src/platforms/mirserver/nativeinterface.cpp 2015-04-01 13:16:10 +0000 | |||
801 | @@ -29,12 +29,17 @@ | |||
802 | 29 | 29 | ||
803 | 30 | if (resource == "SessionAuthorizer") | 30 | if (resource == "SessionAuthorizer") |
804 | 31 | result = m_mirServer->sessionAuthorizer(); | 31 | result = m_mirServer->sessionAuthorizer(); |
807 | 32 | else if (resource == "Shell") | 32 | else if (resource == "WindowManager") |
808 | 33 | result = m_mirServer->shell(); | 33 | result = m_mirServer->windowManager(); |
809 | 34 | else if (resource == "SessionListener") | 34 | else if (resource == "SessionListener") |
810 | 35 | result = m_mirServer->sessionListener(); | 35 | result = m_mirServer->sessionListener(); |
811 | 36 | else if (resource == "PromptSessionListener") | 36 | else if (resource == "PromptSessionListener") |
812 | 37 | result = m_mirServer->promptSessionListener(); | 37 | result = m_mirServer->promptSessionListener(); |
813 | 38 | else if (resource == "mir::shell::Shell") | ||
814 | 39 | { | ||
815 | 40 | const std::weak_ptr<mir::shell::Shell> shell{m_mirServer->the_shell()}; | ||
816 | 41 | result = shell.lock().get(); | ||
817 | 42 | } | ||
818 | 38 | 43 | ||
819 | 39 | return result; | 44 | return result; |
820 | 40 | } | 45 | } |
821 | 41 | 46 | ||
822 | === modified file 'src/platforms/mirserver/nativeinterface.h' | |||
823 | --- src/platforms/mirserver/nativeinterface.h 2014-12-01 11:05:01 +0000 | |||
824 | +++ src/platforms/mirserver/nativeinterface.h 2015-04-01 13:16:10 +0000 | |||
825 | @@ -33,7 +33,7 @@ | |||
826 | 33 | 33 | ||
827 | 34 | virtual void *nativeResourceForIntegration(const QByteArray &resource); | 34 | virtual void *nativeResourceForIntegration(const QByteArray &resource); |
828 | 35 | 35 | ||
830 | 36 | QSharedPointer<MirServer> m_mirServer; | 36 | const QSharedPointer<MirServer> m_mirServer; |
831 | 37 | }; | 37 | }; |
832 | 38 | 38 | ||
833 | 39 | #endif // NATIVEINTEGRATION_H | 39 | #endif // NATIVEINTEGRATION_H |
834 | 40 | 40 | ||
835 | === modified file 'src/platforms/mirserver/qteventfeeder.cpp' | |||
836 | --- src/platforms/mirserver/qteventfeeder.cpp 2015-02-19 23:03:14 +0000 | |||
837 | +++ src/platforms/mirserver/qteventfeeder.cpp 2015-04-01 13:16:10 +0000 | |||
838 | @@ -258,14 +258,14 @@ | |||
839 | 258 | return static_cast<Qt::KeyboardModifiers>(qtModifiers); | 258 | return static_cast<Qt::KeyboardModifiers>(qtModifiers); |
840 | 259 | } | 259 | } |
841 | 260 | 260 | ||
843 | 261 | Qt::MouseButton getQtMouseButtonsfromMirPointerEvent(MirPointerInputEvent const* pev) | 261 | Qt::MouseButton getQtMouseButtonsfromMirPointerEvent(MirPointerEvent const* pev) |
844 | 262 | { | 262 | { |
845 | 263 | int buttons = Qt::NoButton; | 263 | int buttons = Qt::NoButton; |
847 | 264 | if (mir_pointer_input_event_get_button_state(pev, mir_pointer_input_button_primary)) | 264 | if (mir_pointer_event_button_state(pev, mir_pointer_button_primary)) |
848 | 265 | buttons |= Qt::LeftButton; | 265 | buttons |= Qt::LeftButton; |
850 | 266 | if (mir_pointer_input_event_get_button_state(pev, mir_pointer_input_button_secondary)) | 266 | if (mir_pointer_event_button_state(pev, mir_pointer_button_secondary)) |
851 | 267 | buttons |= Qt::RightButton; | 267 | buttons |= Qt::RightButton; |
853 | 268 | if (mir_pointer_input_event_get_button_state(pev, mir_pointer_input_button_tertiary)) | 268 | if (mir_pointer_event_button_state(pev, mir_pointer_button_tertiary)) |
854 | 269 | buttons |= Qt::MidButton; | 269 | buttons |= Qt::MidButton; |
855 | 270 | 270 | ||
856 | 271 | // TODO: Should mir back and forward buttons exist? | 271 | // TODO: Should mir back and forward buttons exist? |
857 | @@ -281,12 +281,12 @@ | |||
858 | 281 | 281 | ||
859 | 282 | auto timestamp = mir_input_event_get_event_time(ev) / 1000000; | 282 | auto timestamp = mir_input_event_get_event_time(ev) / 1000000; |
860 | 283 | 283 | ||
863 | 284 | auto pev = mir_input_event_get_pointer_input_event(ev); | 284 | auto pev = mir_input_event_get_pointer_event(ev); |
864 | 285 | auto modifiers = getQtModifiersFromMir(mir_pointer_input_event_get_modifiers(pev)); | 285 | auto modifiers = getQtModifiersFromMir(mir_pointer_event_modifiers(pev)); |
865 | 286 | auto buttons = getQtMouseButtonsfromMirPointerEvent(pev); | 286 | auto buttons = getQtMouseButtonsfromMirPointerEvent(pev); |
866 | 287 | 287 | ||
869 | 288 | auto local_point = QPointF(mir_pointer_input_event_get_axis_value(pev, mir_pointer_input_axis_x), | 288 | auto local_point = QPointF(mir_pointer_event_axis_value(pev, mir_pointer_axis_x), |
870 | 289 | mir_pointer_input_event_get_axis_value(pev, mir_pointer_input_axis_y)); | 289 | mir_pointer_event_axis_value(pev, mir_pointer_axis_y)); |
871 | 290 | 290 | ||
872 | 291 | mQtWindowSystem->handleMouseEvent(timestamp, local_point, | 291 | mQtWindowSystem->handleMouseEvent(timestamp, local_point, |
873 | 292 | buttons, modifiers); | 292 | buttons, modifiers); |
874 | @@ -299,24 +299,24 @@ | |||
875 | 299 | 299 | ||
876 | 300 | ulong timestamp = mir_input_event_get_event_time(event) / 1000000; | 300 | ulong timestamp = mir_input_event_get_event_time(event) / 1000000; |
877 | 301 | 301 | ||
880 | 302 | auto kev = mir_input_event_get_key_input_event(event); | 302 | auto kev = mir_input_event_get_keyboard_event(event); |
881 | 303 | xkb_keysym_t xk_sym = mir_key_input_event_get_key_code(kev); | 303 | xkb_keysym_t xk_sym = mir_keyboard_event_key_code(kev); |
882 | 304 | 304 | ||
883 | 305 | // Key modifier and unicode index mapping. | 305 | // Key modifier and unicode index mapping. |
885 | 306 | auto modifiers = getQtModifiersFromMir(mir_key_input_event_get_modifiers(kev)); | 306 | auto modifiers = getQtModifiersFromMir(mir_keyboard_event_modifiers(kev)); |
886 | 307 | 307 | ||
887 | 308 | // Key action | 308 | // Key action |
888 | 309 | QEvent::Type keyType = QEvent::KeyRelease; | 309 | QEvent::Type keyType = QEvent::KeyRelease; |
889 | 310 | bool is_auto_rep = false; | 310 | bool is_auto_rep = false; |
890 | 311 | 311 | ||
892 | 312 | switch (mir_key_input_event_get_action(kev)) | 312 | switch (mir_keyboard_event_action(kev)) |
893 | 313 | { | 313 | { |
895 | 314 | case mir_key_input_event_action_repeat: | 314 | case mir_keyboard_action_repeat: |
896 | 315 | is_auto_rep = true; // fall-through | 315 | is_auto_rep = true; // fall-through |
898 | 316 | case mir_key_input_event_action_down: | 316 | case mir_keyboard_action_down: |
899 | 317 | keyType = QEvent::KeyPress; | 317 | keyType = QEvent::KeyPress; |
900 | 318 | break; | 318 | break; |
902 | 319 | case mir_key_input_event_action_up: | 319 | case mir_keyboard_action_up: |
903 | 320 | keyType = QEvent::KeyRelease; | 320 | keyType = QEvent::KeyRelease; |
904 | 321 | break; | 321 | break; |
905 | 322 | default: | 322 | default: |
906 | @@ -332,9 +332,9 @@ | |||
907 | 332 | if (context) { | 332 | if (context) { |
908 | 333 | // TODO: consider event.repeat_count | 333 | // TODO: consider event.repeat_count |
909 | 334 | QKeyEvent qKeyEvent(keyType, keyCode, modifiers, | 334 | QKeyEvent qKeyEvent(keyType, keyCode, modifiers, |
913 | 335 | mir_key_input_event_get_scan_code(kev), | 335 | mir_keyboard_event_scan_code(kev), |
914 | 336 | mir_key_input_event_get_key_code(kev), | 336 | mir_keyboard_event_key_code(kev), |
915 | 337 | mir_key_input_event_get_modifiers(kev), | 337 | mir_keyboard_event_modifiers(kev), |
916 | 338 | text, is_auto_rep); | 338 | text, is_auto_rep); |
917 | 339 | qKeyEvent.setTimestamp(timestamp); | 339 | qKeyEvent.setTimestamp(timestamp); |
918 | 340 | if (context->filterEvent(&qKeyEvent)) { | 340 | if (context->filterEvent(&qKeyEvent)) { |
919 | @@ -344,9 +344,9 @@ | |||
920 | 344 | } | 344 | } |
921 | 345 | 345 | ||
922 | 346 | mQtWindowSystem->handleExtendedKeyEvent(timestamp, keyType, keyCode, modifiers, | 346 | mQtWindowSystem->handleExtendedKeyEvent(timestamp, keyType, keyCode, modifiers, |
926 | 347 | mir_key_input_event_get_scan_code(kev), | 347 | mir_keyboard_event_scan_code(kev), |
927 | 348 | mir_key_input_event_get_key_code(kev), | 348 | mir_keyboard_event_key_code(kev), |
928 | 349 | mir_key_input_event_get_modifiers(kev), text, is_auto_rep); | 349 | mir_keyboard_event_modifiers(kev), text, is_auto_rep); |
929 | 350 | } | 350 | } |
930 | 351 | 351 | ||
931 | 352 | void QtEventFeeder::dispatchTouch(MirInputEvent const* event) | 352 | void QtEventFeeder::dispatchTouch(MirInputEvent const* event) |
932 | @@ -354,7 +354,7 @@ | |||
933 | 354 | if (!mQtWindowSystem->hasTargetWindow()) | 354 | if (!mQtWindowSystem->hasTargetWindow()) |
934 | 355 | return; | 355 | return; |
935 | 356 | 356 | ||
937 | 357 | auto tev = mir_input_event_get_touch_input_event(event); | 357 | auto tev = mir_input_event_get_touch_event(event); |
938 | 358 | 358 | ||
939 | 359 | // FIXME(loicm) Max pressure is device specific. That one is for the Samsung Galaxy Nexus. That | 359 | // FIXME(loicm) Max pressure is device specific. That one is for the Samsung Galaxy Nexus. That |
940 | 360 | // needs to be fixed as soon as the compat input lib adds query support. | 360 | // needs to be fixed as soon as the compat input lib adds query support. |
941 | @@ -364,29 +364,29 @@ | |||
942 | 364 | 364 | ||
943 | 365 | // TODO: Is it worth setting the Qt::TouchPointStationary ones? Currently they are left | 365 | // TODO: Is it worth setting the Qt::TouchPointStationary ones? Currently they are left |
944 | 366 | // as Qt::TouchPointMoved | 366 | // as Qt::TouchPointMoved |
946 | 367 | const int kPointerCount = mir_touch_input_event_get_touch_count(tev); | 367 | const int kPointerCount = mir_touch_event_point_count(tev); |
947 | 368 | for (int i = 0; i < kPointerCount; ++i) { | 368 | for (int i = 0; i < kPointerCount; ++i) { |
948 | 369 | QWindowSystemInterface::TouchPoint touchPoint; | 369 | QWindowSystemInterface::TouchPoint touchPoint; |
949 | 370 | 370 | ||
956 | 371 | const float kX = mir_touch_input_event_get_touch_axis_value(tev, i, mir_touch_input_axis_x); | 371 | const float kX = mir_touch_event_axis_value(tev, i, mir_touch_axis_x); |
957 | 372 | const float kY = mir_touch_input_event_get_touch_axis_value(tev, i, mir_touch_input_axis_y); | 372 | const float kY = mir_touch_event_axis_value(tev, i, mir_touch_axis_y); |
958 | 373 | const float kW = mir_touch_input_event_get_touch_axis_value(tev, i, mir_touch_input_axis_touch_major); | 373 | const float kW = mir_touch_event_axis_value(tev, i, mir_touch_axis_touch_major); |
959 | 374 | const float kH = mir_touch_input_event_get_touch_axis_value(tev, i, mir_touch_input_axis_touch_minor); | 374 | const float kH = mir_touch_event_axis_value(tev, i, mir_touch_axis_touch_minor); |
960 | 375 | const float kP = mir_touch_input_event_get_touch_axis_value(tev, i, mir_touch_input_axis_pressure); | 375 | const float kP = mir_touch_event_axis_value(tev, i, mir_touch_axis_pressure); |
961 | 376 | touchPoint.id = mir_touch_input_event_get_touch_id(tev, i); | 376 | touchPoint.id = mir_touch_event_id(tev, i); |
962 | 377 | 377 | ||
963 | 378 | touchPoint.normalPosition = QPointF(kX / kWindowGeometry.width(), kY / kWindowGeometry.height()); | 378 | touchPoint.normalPosition = QPointF(kX / kWindowGeometry.width(), kY / kWindowGeometry.height()); |
964 | 379 | touchPoint.area = QRectF(kX - (kW / 2.0), kY - (kH / 2.0), kW, kH); | 379 | touchPoint.area = QRectF(kX - (kW / 2.0), kY - (kH / 2.0), kW, kH); |
965 | 380 | touchPoint.pressure = kP / kMaxPressure; | 380 | touchPoint.pressure = kP / kMaxPressure; |
967 | 381 | switch (mir_touch_input_event_get_touch_action(tev, i)) | 381 | switch (mir_touch_event_action(tev, i)) |
968 | 382 | { | 382 | { |
970 | 383 | case mir_touch_input_event_action_up: | 383 | case mir_touch_action_up: |
971 | 384 | touchPoint.state = Qt::TouchPointReleased; | 384 | touchPoint.state = Qt::TouchPointReleased; |
972 | 385 | break; | 385 | break; |
974 | 386 | case mir_touch_input_event_action_down: | 386 | case mir_touch_action_down: |
975 | 387 | touchPoint.state = Qt::TouchPointPressed; | 387 | touchPoint.state = Qt::TouchPointPressed; |
976 | 388 | break; | 388 | break; |
978 | 389 | case mir_touch_input_event_action_change: | 389 | case mir_touch_action_change: |
979 | 390 | touchPoint.state = Qt::TouchPointMoved; | 390 | touchPoint.state = Qt::TouchPointMoved; |
980 | 391 | break; | 391 | break; |
981 | 392 | default: | 392 | default: |
982 | 393 | 393 | ||
983 | === modified file 'src/platforms/mirserver/surfaceobserver.h' | |||
984 | --- src/platforms/mirserver/surfaceobserver.h 2015-04-01 13:16:09 +0000 | |||
985 | +++ src/platforms/mirserver/surfaceobserver.h 2015-04-01 13:16:10 +0000 | |||
986 | @@ -42,7 +42,8 @@ | |||
987 | 42 | void cursor_image_set_to(mir::graphics::CursorImage const&) override {} | 42 | void cursor_image_set_to(mir::graphics::CursorImage const&) override {} |
988 | 43 | void orientation_set_to(MirOrientation) override {} | 43 | void orientation_set_to(MirOrientation) override {} |
989 | 44 | void client_surface_close_requested() override {} | 44 | void client_surface_close_requested() override {} |
991 | 45 | void keymap_changed(xkb_rule_names const&) override {} | 45 | void keymap_changed(xkb_rule_names const &) override {} |
992 | 46 | void renamed(char const *) override {} | ||
993 | 46 | 47 | ||
994 | 47 | Q_SIGNALS: | 48 | Q_SIGNALS: |
995 | 48 | void framesPosted(); | 49 | void framesPosted(); |
996 | 49 | 50 | ||
997 | === modified file 'tests/mirserver/QtEventFeeder/qteventfeeder_test.cpp' | |||
998 | --- tests/mirserver/QtEventFeeder/qteventfeeder_test.cpp 2015-02-19 23:03:14 +0000 | |||
999 | +++ tests/mirserver/QtEventFeeder/qteventfeeder_test.cpp 2015-04-01 13:16:10 +0000 | |||
1000 | @@ -15,8 +15,6 @@ | |||
1001 | 15 | * | 15 | * |
1002 | 16 | */ | 16 | */ |
1003 | 17 | 17 | ||
1004 | 18 | #define MIR_INCLUDE_DEPRECATED_EVENT_HEADER | ||
1005 | 19 | |||
1006 | 20 | #include <gmock/gmock.h> | 18 | #include <gmock/gmock.h> |
1007 | 21 | #include <gtest/gtest.h> | 19 | #include <gtest/gtest.h> |
1008 | 22 | 20 | ||
1009 | @@ -26,6 +24,8 @@ | |||
1010 | 26 | #include <QGuiApplication> | 24 | #include <QGuiApplication> |
1011 | 27 | #include <QWindow> | 25 | #include <QWindow> |
1012 | 28 | 26 | ||
1013 | 27 | #include "mir/events/event_builders.h" | ||
1014 | 28 | |||
1015 | 29 | #include "mock_qtwindowsystem.h" | 29 | #include "mock_qtwindowsystem.h" |
1016 | 30 | 30 | ||
1017 | 31 | using ::testing::_; | 31 | using ::testing::_; |
1018 | @@ -44,6 +44,8 @@ | |||
1019 | 44 | using ::testing::HasId; | 44 | using ::testing::HasId; |
1020 | 45 | using ::testing::StateIsMoved; | 45 | using ::testing::StateIsMoved; |
1021 | 46 | 46 | ||
1022 | 47 | namespace mev = mir::events; | ||
1023 | 48 | |||
1024 | 47 | void PrintTo(const struct QWindowSystemInterface::TouchPoint& touchPoint, ::std::ostream* os) { | 49 | void PrintTo(const struct QWindowSystemInterface::TouchPoint& touchPoint, ::std::ostream* os) { |
1025 | 48 | *os << "TouchPoint(" | 50 | *os << "TouchPoint(" |
1026 | 49 | << "id=" << touchPoint.id | 51 | << "id=" << touchPoint.id |
1027 | @@ -108,19 +110,10 @@ | |||
1028 | 108 | Contains(AllOf(HasId(0), | 110 | Contains(AllOf(HasId(0), |
1029 | 109 | IsPressed()))),_)).Times(1); | 111 | IsPressed()))),_)).Times(1); |
1030 | 110 | 112 | ||
1044 | 111 | MirEvent mirEvent; | 113 | auto ev1 = mev::make_event(MirInputDeviceId(), 123*1000000, 0); |
1045 | 112 | mirEvent.type = mir_event_type_motion; | 114 | mev::add_touch(*ev1, /* touch ID */ 0, mir_touch_action_down, mir_touch_tooltype_unknown, |
1046 | 113 | mirEvent.motion.pointer_count = 1; | 115 | 10, 10, 10, 1, 1, 10); |
1047 | 114 | mirEvent.motion.pointer_coordinates[0].id = 0; | 116 | qtEventFeeder->dispatch(*ev1); |
1035 | 115 | mirEvent.motion.pointer_coordinates[0].x = 10; | ||
1036 | 116 | mirEvent.motion.pointer_coordinates[0].y = 10; | ||
1037 | 117 | mirEvent.motion.pointer_coordinates[0].touch_major = 1; | ||
1038 | 118 | mirEvent.motion.pointer_coordinates[0].touch_minor = 1; | ||
1039 | 119 | mirEvent.motion.pointer_coordinates[0].pressure = 10; | ||
1040 | 120 | mirEvent.motion.action = mir_motion_action_down; | ||
1041 | 121 | mirEvent.motion.event_time = 123 * 1000000; | ||
1042 | 122 | |||
1043 | 123 | qtEventFeeder->dispatch(mirEvent); | ||
1048 | 124 | 117 | ||
1049 | 125 | ASSERT_TRUE(Mock::VerifyAndClearExpectations(mockWindowSystem)); | 118 | ASSERT_TRUE(Mock::VerifyAndClearExpectations(mockWindowSystem)); |
1050 | 126 | 119 | ||
1051 | @@ -131,18 +124,10 @@ | |||
1052 | 131 | Contains(AllOf(HasId(1),IsPressed())) | 124 | Contains(AllOf(HasId(1),IsPressed())) |
1053 | 132 | ),_)).Times(1); | 125 | ),_)).Times(1); |
1054 | 133 | 126 | ||
1067 | 134 | mirEvent.type = mir_event_type_motion; | 127 | auto ev2 = mev::make_event(MirInputDeviceId(), 125*1000000, 0); |
1068 | 135 | mirEvent.motion.pointer_count = 1; | 128 | mev::add_touch(*ev2, 1 /* touch ID */, mir_touch_action_down, mir_touch_tooltype_unknown, |
1069 | 136 | mirEvent.motion.pointer_coordinates[0].id = 1; | 129 | 10, 10, 10, 1, 1, 10); |
1070 | 137 | mirEvent.motion.pointer_coordinates[0].x = 20; | 130 | qtEventFeeder->dispatch(*ev2); |
1059 | 138 | mirEvent.motion.pointer_coordinates[0].y = 20; | ||
1060 | 139 | mirEvent.motion.pointer_coordinates[0].touch_major = 1; | ||
1061 | 140 | mirEvent.motion.pointer_coordinates[0].touch_minor = 1; | ||
1062 | 141 | mirEvent.motion.pointer_coordinates[0].pressure = 10; | ||
1063 | 142 | mirEvent.motion.action = mir_motion_action_down; | ||
1064 | 143 | mirEvent.motion.event_time = 125 * 1000000; | ||
1065 | 144 | |||
1066 | 145 | qtEventFeeder->dispatch(mirEvent); | ||
1071 | 146 | 131 | ||
1072 | 147 | ASSERT_TRUE(Mock::VerifyAndClearExpectations(mockWindowSystem)); | 132 | ASSERT_TRUE(Mock::VerifyAndClearExpectations(mockWindowSystem)); |
1073 | 148 | } | 133 | } |
1074 | @@ -155,19 +140,10 @@ | |||
1075 | 155 | Contains(AllOf(HasId(0), | 140 | Contains(AllOf(HasId(0), |
1076 | 156 | IsPressed()))),_)).Times(1); | 141 | IsPressed()))),_)).Times(1); |
1077 | 157 | 142 | ||
1091 | 158 | MirEvent mirEvent; | 143 | auto ev1 = mev::make_event(MirInputDeviceId(), 123*1000000, 0); |
1092 | 159 | mirEvent.type = mir_event_type_motion; | 144 | mev::add_touch(*ev1, /* touch ID */ 0, mir_touch_action_down, mir_touch_tooltype_unknown, |
1093 | 160 | mirEvent.motion.pointer_count = 1; | 145 | 10, 10, 10, 1, 1, 10); |
1094 | 161 | mirEvent.motion.pointer_coordinates[0].id = 0; | 146 | qtEventFeeder->dispatch(*ev1); |
1082 | 162 | mirEvent.motion.pointer_coordinates[0].x = 10; | ||
1083 | 163 | mirEvent.motion.pointer_coordinates[0].y = 10; | ||
1084 | 164 | mirEvent.motion.pointer_coordinates[0].touch_major = 1; | ||
1085 | 165 | mirEvent.motion.pointer_coordinates[0].touch_minor = 1; | ||
1086 | 166 | mirEvent.motion.pointer_coordinates[0].pressure = 10; | ||
1087 | 167 | mirEvent.motion.action = mir_motion_action_down; | ||
1088 | 168 | mirEvent.motion.event_time = 123 * 1000000; | ||
1089 | 169 | |||
1090 | 170 | qtEventFeeder->dispatch(mirEvent); | ||
1095 | 171 | 147 | ||
1096 | 172 | ASSERT_TRUE(Mock::VerifyAndClearExpectations(mockWindowSystem)); | 148 | ASSERT_TRUE(Mock::VerifyAndClearExpectations(mockWindowSystem)); |
1097 | 173 | 149 | ||
1098 | @@ -177,18 +153,10 @@ | |||
1099 | 177 | Contains(AllOf(HasId(0), StateIsMoved())) | 153 | Contains(AllOf(HasId(0), StateIsMoved())) |
1100 | 178 | ),_)).Times(1); | 154 | ),_)).Times(1); |
1101 | 179 | 155 | ||
1114 | 180 | mirEvent.type = mir_event_type_motion; | 156 | auto ev2 = mev::make_event(MirInputDeviceId(), 123*1000000, 0); |
1115 | 181 | mirEvent.motion.pointer_count = 1; | 157 | mev::add_touch(*ev2, /* touch ID */ 0, mir_touch_action_down, mir_touch_tooltype_unknown, |
1116 | 182 | mirEvent.motion.pointer_coordinates[0].id = 0; | 158 | 10, 10, 10, 1, 1, 10); |
1117 | 183 | mirEvent.motion.pointer_coordinates[0].x = 20; | 159 | qtEventFeeder->dispatch(*ev2); |
1106 | 184 | mirEvent.motion.pointer_coordinates[0].y = 20; | ||
1107 | 185 | mirEvent.motion.pointer_coordinates[0].touch_major = 1; | ||
1108 | 186 | mirEvent.motion.pointer_coordinates[0].touch_minor = 1; | ||
1109 | 187 | mirEvent.motion.pointer_coordinates[0].pressure = 10; | ||
1110 | 188 | mirEvent.motion.action = mir_motion_action_down; | ||
1111 | 189 | mirEvent.motion.event_time = 125 * 1000000; | ||
1112 | 190 | |||
1113 | 191 | qtEventFeeder->dispatch(mirEvent); | ||
1118 | 192 | 160 | ||
1119 | 193 | ASSERT_TRUE(Mock::VerifyAndClearExpectations(mockWindowSystem)); | 161 | ASSERT_TRUE(Mock::VerifyAndClearExpectations(mockWindowSystem)); |
1120 | 194 | } | 162 | } |
1121 | 195 | 163 | ||
1122 | === modified file 'tests/modules/MirSurfaceItem/mirsurfaceitem_test.cpp' | |||
1123 | --- tests/modules/MirSurfaceItem/mirsurfaceitem_test.cpp 2015-02-20 15:57:36 +0000 | |||
1124 | +++ tests/modules/MirSurfaceItem/mirsurfaceitem_test.cpp 2015-04-01 13:16:10 +0000 | |||
1125 | @@ -62,26 +62,26 @@ | |||
1126 | 62 | EXPECT_CALL(*mockSurface, type()).Times(AnyNumber()).WillRepeatedly(Return(mir_surface_type_normal)); | 62 | EXPECT_CALL(*mockSurface, type()).Times(AnyNumber()).WillRepeatedly(Return(mir_surface_type_normal)); |
1127 | 63 | EXPECT_CALL(*mockSession, setSurface(_)).Times(AnyNumber()); | 63 | EXPECT_CALL(*mockSession, setSurface(_)).Times(AnyNumber()); |
1128 | 64 | 64 | ||
1130 | 65 | auto getTouchEvent = [](MirEvent const& event) -> MirTouchInputEvent const* | 65 | auto getTouchEvent = [](MirEvent const& event) -> MirTouchEvent const* |
1131 | 66 | { | 66 | { |
1132 | 67 | if (mir_event_get_type(&event) != mir_event_type_input) | 67 | if (mir_event_get_type(&event) != mir_event_type_input) |
1133 | 68 | return nullptr; | 68 | return nullptr; |
1134 | 69 | auto const* input_event = mir_event_get_input_event(&event); | 69 | auto const* input_event = mir_event_get_input_event(&event); |
1135 | 70 | if (mir_input_event_get_type(input_event) != mir_input_event_type_touch) | 70 | if (mir_input_event_get_type(input_event) != mir_input_event_type_touch) |
1136 | 71 | return nullptr; | 71 | return nullptr; |
1138 | 72 | return mir_input_event_get_touch_input_event(input_event); | 72 | return mir_input_event_get_touch_event(input_event); |
1139 | 73 | }; | 73 | }; |
1140 | 74 | 74 | ||
1141 | 75 | auto eventMatches = [&](MirEvent const& event, | 75 | auto eventMatches = [&](MirEvent const& event, |
1142 | 76 | int touch_count, | 76 | int touch_count, |
1145 | 77 | MirTouchInputEventTouchAction action, | 77 | MirTouchAction action, |
1146 | 78 | MirTouchInputEventTouchId touch_id) ->void | 78 | MirTouchId touch_id) ->void |
1147 | 79 | { | 79 | { |
1148 | 80 | auto const* touch_event = getTouchEvent(event); | 80 | auto const* touch_event = getTouchEvent(event); |
1149 | 81 | ASSERT_NE(touch_event, nullptr); | 81 | ASSERT_NE(touch_event, nullptr); |
1153 | 82 | ASSERT_EQ(touch_count, mir_touch_input_event_get_touch_count(touch_event)); | 82 | ASSERT_EQ(touch_count, mir_touch_event_point_count(touch_event)); |
1154 | 83 | ASSERT_EQ(action, mir_touch_input_event_get_touch_action(touch_event,0)); | 83 | ASSERT_EQ(action, mir_touch_event_action(touch_event,0)); |
1155 | 84 | ASSERT_EQ(touch_id, mir_touch_input_event_get_touch_id(touch_event,0)); | 84 | ASSERT_EQ(touch_id, mir_touch_event_id(touch_event,0)); |
1156 | 85 | }; | 85 | }; |
1157 | 86 | 86 | ||
1158 | 87 | // The touch event sequence we expect mir::input::surface to receive from MirSurfaceItem. | 87 | // The touch event sequence we expect mir::input::surface to receive from MirSurfaceItem. |
1159 | @@ -89,16 +89,16 @@ | |||
1160 | 89 | // the sequence for touch 1. | 89 | // the sequence for touch 1. |
1161 | 90 | EXPECT_CALL(*mockSurface, consume(_)) | 90 | EXPECT_CALL(*mockSurface, consume(_)) |
1162 | 91 | .WillOnce(Invoke([&] (MirEvent const& mirEvent) { | 91 | .WillOnce(Invoke([&] (MirEvent const& mirEvent) { |
1173 | 92 | eventMatches(mirEvent, 1, mir_touch_input_event_action_down, 0); | 92 | eventMatches(mirEvent, 1, mir_touch_action_down, 0); |
1174 | 93 | })) | 93 | })) |
1175 | 94 | .WillOnce(Invoke([&] (MirEvent const& mirEvent) { | 94 | .WillOnce(Invoke([&] (MirEvent const& mirEvent) { |
1176 | 95 | eventMatches(mirEvent, 1, mir_touch_input_event_action_change, 0); | 95 | eventMatches(mirEvent, 1, mir_touch_action_change, 0); |
1177 | 96 | })) | 96 | })) |
1178 | 97 | .WillOnce(Invoke([&] (MirEvent const& mirEvent) { | 97 | .WillOnce(Invoke([&] (MirEvent const& mirEvent) { |
1179 | 98 | eventMatches(mirEvent, 1, mir_touch_input_event_action_up, 0); | 98 | eventMatches(mirEvent, 1, mir_touch_action_up, 0); |
1180 | 99 | })) | 99 | })) |
1181 | 100 | .WillOnce(Invoke([&] (MirEvent const& mirEvent) { | 100 | .WillOnce(Invoke([&] (MirEvent const& mirEvent) { |
1182 | 101 | eventMatches(mirEvent, 1, mir_touch_input_event_action_down, 1); | 101 | eventMatches(mirEvent, 1, mir_touch_action_down, 1); |
1183 | 102 | })); | 102 | })); |
1184 | 103 | 103 | ||
1185 | 104 | 104 | ||
1186 | 105 | 105 | ||
1187 | === modified file 'tests/modules/common/mock_mir_session.h' | |||
1188 | --- tests/modules/common/mock_mir_session.h 2015-01-28 14:25:36 +0000 | |||
1189 | +++ tests/modules/common/mock_mir_session.h 2015-04-01 13:16:10 +0000 | |||
1190 | @@ -66,6 +66,10 @@ | |||
1191 | 66 | void suspend_prompt_session() override {}; | 66 | void suspend_prompt_session() override {}; |
1192 | 67 | void resume_prompt_session() override {}; | 67 | void resume_prompt_session() override {}; |
1193 | 68 | 68 | ||
1194 | 69 | MOCK_CONST_METHOD1(get_buffer_stream, std::shared_ptr<frontend::BufferStream>(frontend::BufferStreamId)); | ||
1195 | 70 | MOCK_METHOD1(destroy_buffer_stream, void(frontend::BufferStreamId)); | ||
1196 | 71 | MOCK_METHOD1(create_buffer_stream, frontend::BufferStreamId(graphics::BufferProperties const&)); | ||
1197 | 72 | |||
1198 | 69 | private: | 73 | private: |
1199 | 70 | std::string m_sessionName; | 74 | std::string m_sessionName; |
1200 | 71 | pid_t m_sessionId; | 75 | pid_t m_sessionId; |
1201 | 72 | 76 | ||
1202 | === modified file 'tests/modules/common/mock_surface.h' | |||
1203 | --- tests/modules/common/mock_surface.h 2015-04-01 13:16:09 +0000 | |||
1204 | +++ tests/modules/common/mock_surface.h 2015-04-01 13:16:10 +0000 | |||
1205 | @@ -66,7 +66,7 @@ | |||
1206 | 66 | MOCK_METHOD1(set_reception_mode, void(input::InputReceptionMode mode)); | 66 | MOCK_METHOD1(set_reception_mode, void(input::InputReceptionMode mode)); |
1207 | 67 | MOCK_METHOD0(request_client_surface_close, void()); | 67 | MOCK_METHOD0(request_client_surface_close, void()); |
1208 | 68 | MOCK_CONST_METHOD1(buffers_ready_for_compositor, int(void const*)); | 68 | MOCK_CONST_METHOD1(buffers_ready_for_compositor, int(void const*)); |
1210 | 69 | void set_keymap(xkb_rule_names const&) override {} | 69 | void set_keymap(xkb_rule_names const &) override {} |
1211 | 70 | 70 | ||
1212 | 71 | // from mir::input::surface | 71 | // from mir::input::surface |
1213 | 72 | MOCK_CONST_METHOD1(input_area_contains, bool(geometry::Point const& point)); | 72 | MOCK_CONST_METHOD1(input_area_contains, bool(geometry::Point const& point)); |
1214 | @@ -80,9 +80,13 @@ | |||
1215 | 80 | MOCK_CONST_METHOD0(client_input_fd, int()); | 80 | MOCK_CONST_METHOD0(client_input_fd, int()); |
1216 | 81 | MOCK_METHOD2(configure, int(MirSurfaceAttrib attrib, int value)); | 81 | MOCK_METHOD2(configure, int(MirSurfaceAttrib attrib, int value)); |
1217 | 82 | MOCK_CONST_METHOD1(query, int(MirSurfaceAttrib attrib)); | 82 | MOCK_CONST_METHOD1(query, int(MirSurfaceAttrib attrib)); |
1218 | 83 | bool modify(const Modifications &) override { return false; } | ||
1219 | 84 | |||
1220 | 83 | 85 | ||
1221 | 84 | // from mir::scene::SurfaceBufferAccess | 86 | // from mir::scene::SurfaceBufferAccess |
1222 | 85 | MOCK_METHOD1(with_most_recent_buffer_do, void(std::function<void(graphics::Buffer&)> const& exec)); | 87 | MOCK_METHOD1(with_most_recent_buffer_do, void(std::function<void(graphics::Buffer&)> const& exec)); |
1223 | 88 | |||
1224 | 89 | MOCK_METHOD2(set_cursor_stream, void(std::shared_ptr<frontend::BufferStream> const&, geometry::Displacement const&)); | ||
1225 | 86 | }; | 90 | }; |
1226 | 87 | 91 | ||
1227 | 88 | } // namespace scene | 92 | } // namespace scene |
1228 | 89 | 93 | ||
1229 | === modified file 'tests/modules/common/qtmir_test.h' | |||
1230 | --- tests/modules/common/qtmir_test.h 2015-02-06 09:47:21 +0000 | |||
1231 | +++ tests/modules/common/qtmir_test.h 2015-04-01 13:16:10 +0000 | |||
1232 | @@ -109,7 +109,6 @@ | |||
1233 | 109 | &applicationManager, | 109 | &applicationManager, |
1234 | 110 | } | 110 | } |
1235 | 111 | , surfaceManager{ | 111 | , surfaceManager{ |
1236 | 112 | mirServer, | ||
1237 | 113 | mirShell, | 112 | mirShell, |
1238 | 114 | &sessionManager | 113 | &sessionManager |
1239 | 115 | } | 114 | } |
1240 | @@ -150,7 +149,7 @@ | |||
1241 | 150 | testing::NiceMock<testing::MockDesktopFileReaderFactory> desktopFileReaderFactory; | 149 | testing::NiceMock<testing::MockDesktopFileReaderFactory> desktopFileReaderFactory; |
1242 | 151 | testing::NiceMock<testing::MockSharedWakelock> sharedWakelock; | 150 | testing::NiceMock<testing::MockSharedWakelock> sharedWakelock; |
1243 | 152 | QSharedPointer<FakeMirServer> mirServer; | 151 | QSharedPointer<FakeMirServer> mirServer; |
1245 | 153 | MirShell *mirShell{nullptr}; | 152 | mir::shell::Shell *mirShell{nullptr}; |
1246 | 154 | QSharedPointer<TaskController> taskController; | 153 | QSharedPointer<TaskController> taskController; |
1247 | 155 | ApplicationManager applicationManager; | 154 | ApplicationManager applicationManager; |
1248 | 156 | SessionManager sessionManager; | 155 | SessionManager sessionManager; |
FAILED: Continuous integration, rev:340 jenkins. qa.ubuntu. com/job/ qtmir-ci/ 244/ jenkins. qa.ubuntu. com/job/ qtmir-vivid- amd64-ci/ 95/console jenkins. qa.ubuntu. com/job/ qtmir-vivid- armhf-ci/ 95/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/qtmir- ci/244/ rebuild
http://