Merge lp:~azzar1/unity/lp-1292391 into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 3827
Proposed branch: lp:~azzar1/unity/lp-1292391
Merge into: lp:unity
Diff against target: 24 lines (+9/-2)
1 file modified
lockscreen/LockScreenController.cpp (+9/-2)
To merge this branch: bzr merge lp:~azzar1/unity/lp-1292391
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+221188@code.launchpad.net

Commit message

Manually emit nux::Area::geometry_changed beucase nux can fail to emit it.

Description of the change

== Problem ==
lockscreen - wallpaper is not properly resized when unplugging monitors

== Fix ==
Manually emit nux::Area::geometry_changed beucase nux can fail to emit it.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lockscreen/LockScreenController.cpp'
2--- lockscreen/LockScreenController.cpp 2014-05-12 22:00:44 +0000
3+++ lockscreen/LockScreenController.cpp 2014-05-28 09:28:28 +0000
4@@ -204,11 +204,18 @@
5 is_new = true;
6 }
7
8- shield->SetGeometry(monitors[i]);
9- shield->SetMinMaxSize(monitors[i].width, monitors[i].height);
10+ auto old_geo = shield->GetGeometry();
11+ auto new_geo = monitors[i];
12+
13+ shield->SetGeometry(new_geo);
14+ shield->SetMinMaxSize(new_geo.width, new_geo.height);
15 shield->primary = (i == primary);
16 shield->monitor = i;
17
18+ // XXX: manually emit nux::Area::geometry_changed beucase nux can fail to emit it.
19+ if (old_geo != new_geo)
20+ shield->geometry_changed.emit(shield.GetPointer(), new_geo);
21+
22 if (is_new && fade_animator_.GetCurrentValue() > 0)
23 {
24 shield->SetOpacity(fade_animator_.GetCurrentValue());