Merge lp:~azzar1/unity/fix-991637-6.0 into lp:unity/6.0

Proposed by Andrea Azzarone
Status: Merged
Approved by: Brandon Schaefer
Approved revision: no longer in the source branch.
Merged at revision: 2801
Proposed branch: lp:~azzar1/unity/fix-991637-6.0
Merge into: lp:unity/6.0
Diff against target: 33 lines (+11/-1)
2 files modified
launcher/LauncherController.cpp (+1/-1)
tests/test_launcher_controller.cpp (+10/-0)
To merge this branch: bzr merge lp:~azzar1/unity/fix-991637-6.0
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
Review via email: mp+148545@code.launchpad.net

This proposal supersedes a proposal from 2013-02-14.

Commit message

Backport fix for 991637.

Description of the change

== Problem ==
unity launcher vanishes when switching to mirrored displays

== Test ==
Unit test added.

To post a comment you must log in.
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'launcher/LauncherController.cpp'
--- launcher/LauncherController.cpp 2012-10-18 16:44:39 +0000
+++ launcher/LauncherController.cpp 2013-02-14 20:05:39 +0000
@@ -198,7 +198,7 @@
198 launchers[i] = nux::ObjectPtr<Launcher>(CreateLauncher(i));198 launchers[i] = nux::ObjectPtr<Launcher>(CreateLauncher(i));
199 }199 }
200200
201 int monitor = (num_launchers == 1) ? primary : i;201 int monitor = (num_launchers == 1 && num_monitors > 1) ? primary : i;
202202
203 if (launchers[i]->monitor() != monitor)203 if (launchers[i]->monitor() != monitor)
204 {204 {
205205
=== modified file 'tests/test_launcher_controller.cpp'
--- tests/test_launcher_controller.cpp 2012-10-17 10:26:44 +0000
+++ tests/test_launcher_controller.cpp 2013-02-14 20:05:39 +0000
@@ -322,6 +322,16 @@
322 }322 }
323}323}
324324
325TEST_F(TestLauncherController, MirroredMultimonitorSingleLauncherOnExternalMonitor)
326{
327 // See lp bug 991637
328 lc.multiple_launchers = false;
329 uscreen.SetPrimary(1);
330
331 ASSERT_EQ(lc.launchers().size(), 1);
332 ASSERT_EQ(lc.launcher().monitor(), 0);
333}
334
325TEST_F(TestLauncherController, MultimonitorSwitchToMultipleLaunchers)335TEST_F(TestLauncherController, MultimonitorSwitchToMultipleLaunchers)
326{336{
327 lc.multiple_launchers = false;337 lc.multiple_launchers = false;

Subscribers

People subscribed via source and target branches