Merge lp:~3v1n0/unity/multimonitor-icons-redraw-fix into lp:unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 2170
Proposed branch: lp:~3v1n0/unity/multimonitor-icons-redraw-fix
Merge into: lp:unity
Diff against target: 13 lines (+3/-0)
1 file modified
plugins/unityshell/src/Launcher.cpp (+3/-0)
To merge this branch: bzr merge lp:~3v1n0/unity/multimonitor-icons-redraw-fix
Reviewer Review Type Date Requested Status
Thomi Richards (community) Approve
Review via email: mp+99237@code.launchpad.net

Commit message

Launcher: Connect the already present icons to signals when setting the model.

When a new launcher is added, we need to connect the icons that are already on the model to the needs_redraw signal, or the new launcher won't redraw when they ask that.

Description of the change

We need to connect the icons to the signals not to have redraw issues on newly created launchers...

Tests for this are already covered by the current manual tests, that were not fully passing on monitors hot-changes.

To post a comment you must log in.
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/Launcher.cpp'
2--- plugins/unityshell/src/Launcher.cpp 2012-03-23 10:26:53 +0000
3+++ plugins/unityshell/src/Launcher.cpp 2012-03-25 23:44:17 +0000
4@@ -1814,6 +1814,9 @@
5 {
6 _model = model;
7
8+ for (auto icon : *_model)
9+ icon->needs_redraw.connect(sigc::mem_fun(this, &Launcher::OnIconNeedsRedraw));
10+
11 _model->icon_added.connect(sigc::mem_fun(this, &Launcher::OnIconAdded));
12 _model->icon_removed.connect(sigc::mem_fun(this, &Launcher::OnIconRemoved));
13 _model->order_changed.connect(sigc::mem_fun(this, &Launcher::OnOrderChanged));