Merge lp://staging/~gerboland/qtmir/initialSurfaceGeometry into lp://staging/qtmir

Proposed by Gerry Boland
Status: Work in progress
Proposed branch: lp://staging/~gerboland/qtmir/initialSurfaceGeometry
Merge into: lp://staging/qtmir
Prerequisite: lp://staging/~dandrader/qtmir/lifecycle
Diff against target: 5503 lines (+1949/-1606)
45 files modified
CMakeLists.txt (+3/-1)
debian/changelog (+7/-0)
debian/control (+1/-1)
src/common/globals.h (+76/-0)
src/modules/Unity/Application/CMakeLists.txt (+2/-0)
src/modules/Unity/Application/application.cpp (+341/-69)
src/modules/Unity/Application/application.h (+61/-19)
src/modules/Unity/Application/application_manager.cpp (+118/-245)
src/modules/Unity/Application/application_manager.h (+22/-20)
src/modules/Unity/Application/applicationcontroller.h (+2/-1)
src/modules/Unity/Application/applicationscreenshotprovider.cpp (+1/-1)
src/modules/Unity/Application/mirsurfaceitem.cpp (+25/-25)
src/modules/Unity/Application/mirsurfaceitem.h (+21/-78)
src/modules/Unity/Application/mirsurfaceiteminterface.h (+89/-0)
src/modules/Unity/Application/mirsurfaceitemmodel.h (+2/-2)
src/modules/Unity/Application/mirsurfacemanager.cpp (+6/-6)
src/modules/Unity/Application/mirsurfacemanager.h (+4/-4)
src/modules/Unity/Application/plugin.cpp (+30/-32)
src/modules/Unity/Application/session.cpp (+123/-73)
src/modules/Unity/Application/session.h (+15/-8)
src/modules/Unity/Application/session_interface.h (+31/-23)
src/modules/Unity/Application/sessionmanager.cpp (+2/-2)
src/modules/Unity/Application/sessionmanager.h (+3/-1)
src/modules/Unity/Application/taskcontroller.cpp (+8/-13)
src/modules/Unity/Application/taskcontroller.h (+4/-6)
src/modules/Unity/Application/upstart/applicationcontroller.cpp (+10/-2)
src/platforms/mirserver/CMakeLists.txt (+2/-0)
src/platforms/mirserver/mirserver.cpp (+1/-2)
src/platforms/mirserver/mirshell.cpp (+28/-23)
src/platforms/mirserver/mirshell.h (+16/-12)
tests/modules/Application/CMakeLists.txt (+5/-0)
tests/modules/Application/application_test.cpp (+145/-71)
tests/modules/ApplicationManager/CMakeLists.txt (+5/-1)
tests/modules/ApplicationManager/application_manager_test.cpp (+410/-831)
tests/modules/MirSurfaceItem/CMakeLists.txt (+3/-1)
tests/modules/MirSurfaceItem/mirsurfaceitem_test.cpp (+1/-1)
tests/modules/SessionManager/CMakeLists.txt (+4/-0)
tests/modules/SessionManager/session_manager_test.cpp (+1/-1)
tests/modules/SessionManager/session_test.cpp (+57/-24)
tests/modules/TaskController/CMakeLists.txt (+1/-0)
tests/modules/common/fake_mirsurfaceitem.h (+95/-0)
tests/modules/common/mock_mirsurfaceitem.h (+50/-0)
tests/modules/common/mock_session.h (+44/-5)
tests/modules/common/qtmir_test.cpp (+61/-0)
tests/modules/common/qtmir_test.h (+13/-2)
To merge this branch: bzr merge lp://staging/~gerboland/qtmir/initialSurfaceGeometry
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Albert Astals Cid (community) Needs Fixing
Michał Sawicz Approve
Daniel d'Andrada Pending
Review via email: mp+231725@code.staging.launchpad.net

This proposal supersedes a proposal from 2014-08-12.

Commit message

Implement a callback mechanism to allow shell override the initial surface geometry requested by clients

Description of the change

* Are there any related MPs required for this MP to build/function as expected? Please list.
https://code.launchpad.net/~gerboland/unity-api/surfaceSizerCallback/+merge/231698
 * Did you perform an exploratory manual test run of your code change and any related functionality?
Y
 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A
 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
Michał Sawicz (saviq) wrote : Posted in a previous version of this proposal

See inline.

review: Needs Fixing
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

Comments addressed, please check out rev 234

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) : Posted in a previous version of this proposal
Revision history for this message
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

In src/platforms/mirserver/mirplacementstrategy.h
+ void sessionAboutToCreateSurface(const mir::scene::Session &session, QSize &surfaceGeometry); // requires Qt::BlockingQueuedConnection!!

That line is way too long.

In tests/modules/ApplicationManager/application_manager_test.cpp

+ QJSValue callback = jsEngine->evaluate("(function(surface) { var out = new Object(); out.height = 333; return out; })");

Here as well.

Looks good otherwise.

review: Needs Fixing
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

Done

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Michał Sawicz (saviq) wrote : Posted in a previous version of this proposal

Minor inline.

review: Needs Fixing
Revision history for this message
Gerry Boland (gerboland) : Posted in a previous version of this proposal
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) : Posted in a previous version of this proposal
Revision history for this message
Gerry Boland (gerboland) : Posted in a previous version of this proposal
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Looks good.

review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

635 + std::shared_ptr<MirPlacementStrategy> m_placementStrategy; // remove when bug lp:1407687 fixed
...
601 + //auto sharedPtr = the_placement_strategy(); - re-instate when bug lp:1407687 fixed
602 + if (m_placementStrategy.unique()) return 0;
603 +
604 + return static_cast<MirPlacementStrategy*>(m_placementStrategy.get());

Better as:

std::weak_ptr<MirPlacementStrategy> m_placementStrategy;
....

return m_placementStrategy.lock().get());

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Code looks good, haven't time to test. If nobody beats me to it, i'll do on Monday

review: Approve (code)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Doesn't merge correctly

Text conflict in debian/changelog
Text conflict in src/modules/Unity/Application/application_manager.cpp
Text conflict in src/modules/Unity/Application/application_manager.h
3 conflicts encountered.

review: Needs Fixing
262. By Gerry Boland

Merge trunk & fix conflicts

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Let's wait for https://code.launchpad.net/~gerboland/unity8/initialSurfaceGeometry/+merge/231726 to be finished so we can try it all together

263. By Gerry Boland

Move Surface Types & States into Globals enum class. Expand surfaceSizer parameter to include state

264. By Gerry Boland

Merge trunk

265. By Gerry Boland

Merge trunk, required many changes

266. By Gerry Boland

Remove accidental commits

267. By Gerry Boland

Remove local build tweak

268. By Gerry Boland

Merge trunk

269. By Gerry Boland

Merge detach-state-from-focus and resolve conflicts

Unmerged revisions

269. By Gerry Boland

Merge detach-state-from-focus and resolve conflicts

268. By Gerry Boland

Merge trunk

267. By Gerry Boland

Remove local build tweak

266. By Gerry Boland

Remove accidental commits

265. By Gerry Boland

Merge trunk, required many changes

264. By Gerry Boland

Merge trunk

263. By Gerry Boland

Move Surface Types & States into Globals enum class. Expand surfaceSizer parameter to include state

262. By Gerry Boland

Merge trunk & fix conflicts

261. By Gerry Boland

Merge trunk

260. By Gerry Boland

Workaround MirServer API missing the_placement_strategy method (bug lp:1407687)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches