Merge lp:~townsend/unity/fix-lp1451613-trusty into lp:unity/7.2

Proposed by Christopher Townsend
Status: Merged
Approved by: Stephen M. Webb
Approved revision: no longer in the source branch.
Merged at revision: 3831
Proposed branch: lp:~townsend/unity/fix-lp1451613-trusty
Merge into: lp:unity/7.2
Diff against target: 171 lines (+7/-45)
5 files modified
launcher/EdgeBarrierController.cpp (+1/-19)
launcher/EdgeBarrierController.h (+0/-1)
plugins/unityshell/src/unityshell.cpp (+4/-8)
plugins/unityshell/src/unityshell.h (+2/-2)
tests/test_edge_barrier_controller.cpp (+0/-15)
To merge this branch: bzr merge lp:~townsend/unity/fix-lp1451613-trusty
Reviewer Review Type Date Requested Status
Stephen M. Webb (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+260944@code.launchpad.net

Commit message

Revert rev. 3810 due to a crash being seen on Trusty when the lockscreen is activated.

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
Stephen M. Webb (bregma) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/EdgeBarrierController.cpp'
2--- launcher/EdgeBarrierController.cpp 2015-03-11 19:09:46 +0000
3+++ launcher/EdgeBarrierController.cpp 2015-06-03 12:52:27 +0000
4@@ -91,15 +91,8 @@
5 ResizeBarrierList(layout);
6 SetupBarriers(layout);
7 }));*/
8-
9 uscreen->changed.connect(sigc::mem_fun(this, &EdgeBarrierController::Impl::OnUScreenChanged));
10
11- parent_->force_disable.changed.connect([this] (bool) {
12- auto monitors = UScreen::GetDefault()->GetMonitors();
13- ResizeBarrierList(monitors);
14- SetupBarriers(monitors);
15- });
16-
17 parent_->sticky_edges.SetGetterFunction([this] {
18 return parent_->options() ? parent_->options()->edge_resist() : false;
19 });
20@@ -165,13 +158,6 @@
21
22 void EdgeBarrierController::Impl::ResizeBarrierList(std::vector<nux::Geometry> const& layout)
23 {
24- if (parent_->force_disable)
25- {
26- vertical_barriers_.clear();
27- horizontal_barriers_.clear();
28- return;
29- }
30-
31 auto num_monitors = layout.size();
32
33 if (vertical_barriers_.size() > num_monitors)
34@@ -211,9 +197,6 @@
35
36 void EdgeBarrierController::Impl::SetupBarriers(std::vector<nux::Geometry> const& layout)
37 {
38- if (parent_->force_disable())
39- return;
40-
41 bool edge_resist = parent_->sticky_edges();
42
43 for (unsigned i = 0; i < layout.size(); i++)
44@@ -454,8 +437,7 @@
45 }
46
47 EdgeBarrierController::EdgeBarrierController()
48- : force_disable(false)
49- , pimpl(new Impl(this))
50+ : pimpl(new Impl(this))
51 {}
52
53 EdgeBarrierController::~EdgeBarrierController()
54
55=== modified file 'launcher/EdgeBarrierController.h'
56--- launcher/EdgeBarrierController.h 2015-03-11 19:09:46 +0000
57+++ launcher/EdgeBarrierController.h 2015-06-03 12:52:27 +0000
58@@ -49,7 +49,6 @@
59 ~EdgeBarrierController();
60
61 nux::RWProperty<bool> sticky_edges;
62- nux::Property<bool> force_disable;
63 nux::Property<launcher::Options::Ptr> options;
64
65 void AddHorizontalSubscriber(EdgeBarrierSubscriber* subscriber, unsigned int monitor);
66
67=== modified file 'plugins/unityshell/src/unityshell.cpp'
68--- plugins/unityshell/src/unityshell.cpp 2015-05-21 15:06:34 +0000
69+++ plugins/unityshell/src/unityshell.cpp 2015-06-03 12:52:27 +0000
70@@ -47,6 +47,7 @@
71 #include "unityshell.h"
72 #include "BackgroundEffectHelper.h"
73 #include "UnityGestureBroker.h"
74+#include "launcher/EdgeBarrierController.h"
75 #include "launcher/XdndCollectionWindowImp.h"
76 #include "launcher/XdndManagerImp.h"
77 #include "launcher/XdndStartStopNotifierImp.h"
78@@ -3822,9 +3823,6 @@
79
80 showLauncherKeyTerminate(&optionGetShowLauncher(), CompAction::StateTermKey, options);
81 showMenuBarTerminate(&optionGetShowMenuBar(), CompAction::StateTermKey, options);
82-
83- // We disable the edge barriers, to avoid blocking the mouse pointer during lockscreen
84- edge_barriers_->force_disable = true;
85 }
86
87 void UnityScreen::OnScreenUnlocked()
88@@ -3839,8 +3837,6 @@
89
90 for (auto& action : getActions())
91 screen->addAction(&action);
92-
93- edge_barriers_->force_disable = false;
94 }
95
96 void UnityScreen::SaveLockStamp(bool save)
97@@ -3893,9 +3889,9 @@
98 auto xdnd_collection_window = std::make_shared<XdndCollectionWindowImp>();
99 auto xdnd_start_stop_notifier = std::make_shared<XdndStartStopNotifierImp>();
100 auto xdnd_manager = std::make_shared<XdndManagerImp>(xdnd_start_stop_notifier, xdnd_collection_window);
101- edge_barriers_ = std::make_shared<ui::EdgeBarrierController>();
102+ auto edge_barriers = std::make_shared<ui::EdgeBarrierController>();
103
104- launcher_controller_ = std::make_shared<launcher::Controller>(xdnd_manager, edge_barriers_);
105+ launcher_controller_ = std::make_shared<launcher::Controller>(xdnd_manager, edge_barriers);
106 AddChild(launcher_controller_.get());
107
108 switcher_controller_ = std::make_shared<switcher::Controller>();
109@@ -3906,7 +3902,7 @@
110
111 /* Setup panel */
112 timer.Reset();
113- panel_controller_ = std::make_shared<panel::Controller>(menus_, edge_barriers_);
114+ panel_controller_ = std::make_shared<panel::Controller>(menus_, edge_barriers);
115 AddChild(panel_controller_.get());
116 LOG_INFO(logger) << "initLauncher-Panel " << timer.ElapsedSeconds() << "s";
117
118
119=== modified file 'plugins/unityshell/src/unityshell.h'
120--- plugins/unityshell/src/unityshell.h 2015-03-11 19:09:46 +0000
121+++ plugins/unityshell/src/unityshell.h 2015-06-03 12:52:27 +0000
122@@ -54,8 +54,8 @@
123 #include "DashController.h"
124 #include "UnitySettings.h"
125 #include "DashStyle.h"
126-#include "EdgeBarrierController.h"
127 #include "FavoriteStoreGSettings.h"
128+#include "FontSettings.h"
129 #include "ShortcutController.h"
130 #include "LauncherController.h"
131 #include "LockScreenController.h"
132@@ -326,6 +326,7 @@
133 Settings unity_settings_;
134 dash::Style dash_style_;
135 panel::Style panel_style_;
136+ FontSettings font_settings_;
137 internal::FavoriteStoreGSettings favorite_store_;
138 ThumbnailGenerator thumbnail_generator_;
139 lockscreen::Settings lockscreen_settings_;
140@@ -348,7 +349,6 @@
141 session::Controller::Ptr session_controller_;
142 lockscreen::DBusManager::Ptr screensaver_dbus_manager_;
143 lockscreen::Controller::Ptr lockscreen_controller_;
144- ui::EdgeBarrierController::Ptr edge_barriers_;
145 debug::DebugDBusInterface debugger_;
146 std::unique_ptr<BGHash> bghash_;
147 spread::Filter::Ptr spread_filter_;
148
149=== modified file 'tests/test_edge_barrier_controller.cpp'
150--- tests/test_edge_barrier_controller.cpp 2015-03-11 19:09:46 +0000
151+++ tests/test_edge_barrier_controller.cpp 2015-06-03 12:52:27 +0000
152@@ -653,19 +653,4 @@
153 ProcessBarrierEvent(&owner, firstEvent);
154 }
155
156-TEST_F(TestEdgeBarrierController, ForceDisable)
157-{
158- ASSERT_FALSE(bc.force_disable);
159-
160- bc.force_disable = true;
161-
162- ASSERT_TRUE(GetPrivateImpl()->vertical_barriers_.empty());
163- ASSERT_TRUE(GetPrivateImpl()->horizontal_barriers_.empty());
164-
165- bc.force_disable = false;
166-
167- ASSERT_FALSE(GetPrivateImpl()->vertical_barriers_.empty());
168- ASSERT_FALSE(GetPrivateImpl()->horizontal_barriers_.empty());
169-}
170-
171 }

Subscribers

People subscribed via source and target branches

to status/vote changes: