diff -rp -U2 unity-7.1.2+14.04.20140303/launcher/ApplicationLauncherIcon.cpp unity-7.1.2+14.04.20140303+lp1286784/launcher/ApplicationLauncherIcon.cpp --- unity-7.1.2+14.04.20140303/launcher/ApplicationLauncherIcon.cpp 2014-03-03 11:47:14.000000000 -0500 +++ unity-7.1.2+14.04.20140303+lp1286784/launcher/ApplicationLauncherIcon.cpp 2014-03-04 01:40:07.188900036 -0500 @@ -1277,17 +1277,15 @@ const std::set ApplicationL void PerformScrollUp(WindowList const& windows, unsigned int progressive_scroll) { - if (!progressive_scroll) - { - windows.at(1)->Focus(); - return; - } - else if (progressive_scroll == 1) + if (progressive_scroll == windows.size() - 1) { + //RestackAbove to preserve Global Stacking Order + WindowManager::Default().RestackBelow(windows.at(0)->window_id(), windows.at(1)->window_id()); + WindowManager::Default().RestackBelow(windows.at(1)->window_id(), windows.at(0)->window_id()); windows.back()->Focus(); return; } - WindowManager::Default().RestackBelow(windows.at(0)->window_id(), windows.at(windows.size() - progressive_scroll + 1)->window_id()); - windows.at(windows.size() - progressive_scroll + 1)->Focus(); + WindowManager::Default().RestackBelow(windows.at(0)->window_id(), windows.at(progressive_scroll + 1)->window_id()); + windows.at(progressive_scroll + 1)->Focus(); } @@ -1309,9 +1307,8 @@ void ApplicationLauncherIcon::PerformScr if (timestamp - _last_scroll_timestamp < 150) return; - else if (timestamp - _last_scroll_timestamp > 1500 || direction != _last_scroll_direction) + else if (timestamp - _last_scroll_timestamp > 1500) _progressive_scroll = 0; _last_scroll_timestamp = timestamp; - _last_scroll_direction = direction; auto const& windows = GetWindowsOnCurrentDesktopInStackingOrder(); @@ -1320,5 +1317,9 @@ void ApplicationLauncherIcon::PerformScr return; - ++_progressive_scroll; + if (direction == ScrollDirection::DOWN) + ++_progressive_scroll; + else + //--_progressive_scroll; but roll to the top of windows + _progressive_scroll += windows.size() - 1; _progressive_scroll %= windows.size();