Merge lp://staging/~jassmith/unity/unity.mm-options into lp://staging/unity

Proposed by Jason Smith
Status: Merged
Approved by: Jason Smith
Approved revision: no longer in the source branch.
Merged at revision: 2094
Proposed branch: lp://staging/~jassmith/unity/unity.mm-options
Merge into: lp://staging/unity
Diff against target: 617 lines (+191/-61)
16 files modified
manual-tests/MMOptions.txt (+22/-0)
plugins/unityshell/src/AbstractLauncherIcon.h (+2/-0)
plugins/unityshell/src/DashController.cpp (+16/-4)
plugins/unityshell/src/DashController.h (+2/-0)
plugins/unityshell/src/Launcher.cpp (+48/-32)
plugins/unityshell/src/Launcher.h (+3/-0)
plugins/unityshell/src/LauncherController.cpp (+44/-16)
plugins/unityshell/src/LauncherController.h (+1/-0)
plugins/unityshell/src/LauncherIcon.cpp (+9/-0)
plugins/unityshell/src/LauncherIcon.h (+2/-0)
plugins/unityshell/src/LauncherOptions.cpp (+3/-0)
plugins/unityshell/src/LauncherOptions.h (+2/-0)
plugins/unityshell/src/MockLauncherIcon.h (+5/-0)
plugins/unityshell/src/UScreen.cpp (+1/-9)
plugins/unityshell/src/unityshell.cpp (+10/-0)
plugins/unityshell/unityshell.xml.in (+21/-0)
To merge this branch: bzr merge lp://staging/~jassmith/unity/unity.mm-options
Reviewer Review Type Date Requested Status
Tim Penhey (community) Approve
Review via email: mp+97133@code.staging.launchpad.net

Description of the change

== The Problem ==
Design requested changes to multi-monitor to provide support for toggling barriers and multiple-launchers

== The Solution ==
Implement the options

== Testing ==
Interactions should be covered under existing tests

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

You hit my rule of three, same code in three places should be a simple method:

int get_monitor(bool use_primary)
{
  UScreen *uscreen = UScreen::GetDefault();
  if (use_primary)
    return uscreen->GetPrimaryMonitor();
  else
    return uscreen->GetMonitorWithMouse();
}

  // ... then
  auto monitor_geo = uscreen->GetMonitorGeometry(get_monitor(use_primary));

review: Needs Fixing
Revision history for this message
Tim Penhey (thumper) wrote :

Thanks for the updates.

review: Approve
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Can you please open a bug (or ask design to do so for a FFe?)

Revision history for this message
Omer Akram (om26er) wrote :

bugs are 950136 and 946104

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

387 +nux::ObjectPtr<Launcher> Controller::Impl::CurrentLauncher()
388 +{
389 + nux::ObjectPtr<Launcher> result;
390 + int best = std::max<int> (launchers.size() - 1, MonitorWithMouse());
391 + if (best >= 0)
392 + result = launchers[best];
393 + return result;
394 +}

This is causing that the right-most monitor is always used for keyboard navigation, while the MonitorWithMouse is actually ignored.

Using std::min of course fixes the issue.

Also, there are some autopilot tests failing when using this in multimonitor (some of them should be related to the problem above).

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.