Merge lp:~kdub/unity-system-compositor/silo0-n7-fix into lp:~mir-team/unity-system-compositor/silo0

Proposed by Kevin DuBois
Status: Merged
Merged at revision: 246
Proposed branch: lp:~kdub/unity-system-compositor/silo0-n7-fix
Merge into: lp:~mir-team/unity-system-compositor/silo0
Diff against target: 18 lines (+3/-0)
1 file modified
src/window_manager.cpp (+3/-0)
To merge this branch: bzr merge lp:~kdub/unity-system-compositor/silo0-n7-fix
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Review via email: mp+267654@code.launchpad.net

Description of the change

Return immeditately if there is no default surface in the window resizing code.

To post a comment you must log in.
Revision history for this message
Gerry Boland (gerboland) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/window_manager.cpp'
2--- src/window_manager.cpp 2015-08-04 21:16:54 +0000
3+++ src/window_manager.cpp 2015-08-11 13:03:27 +0000
4@@ -157,11 +157,14 @@
5 std::cout << "Intersection: " << intersection << std::endl;
6
7 // Now resize all surfaces in scene to this value
8+ // TODO: (kdub) have Mir provide an easier route for this operation
9 for (auto &session : sessions)
10 {
11 auto first = session->default_surface();
12+ if (!first) return;
13 first->resize(intersection.size);
14 auto next = session->surface_after(first);
15+ if (!next) return;
16 while (next != first)
17 {
18 next->resize(intersection.size);

Subscribers

People subscribed via source and target branches