summaryrefslogtreecommitdiff
diff options
-rw-r--r--dash/DashController.cpp3
-rw-r--r--launcher/CairoBaseWindow.cpp4
-rw-r--r--launcher/LauncherController.cpp8
-rw-r--r--launcher/LauncherControllerPrivate.h1
-rw-r--r--launcher/SwitcherController.cpp4
-rw-r--r--lockscreen/LockScreenController.cpp5
-rw-r--r--shortcuts/ShortcutController.cpp5
-rw-r--r--shutdown/SessionController.cpp4
-rw-r--r--unity-shared/SpreadFilter.cpp4
9 files changed, 30 insertions, 8 deletions
diff --git a/dash/DashController.cpp b/dash/DashController.cpp
index 76b4cbac2..88f4afeb2 100644
--- a/dash/DashController.cpp
+++ b/dash/DashController.cpp
@@ -92,6 +92,9 @@ Controller::Controller(Controller::WindowCreator const& create_window)
SetupWindow();
UScreen::GetDefault()->changed.connect(sigc::mem_fun(this, &Controller::OnMonitorChanged));
Settings::Instance().launcher_position.changed.connect(sigc::hide(sigc::mem_fun(this, &Controller::Relayout)));
+ Settings::Instance().low_gfx.changed.connect(sigc::track_obj([this] (bool low_gfx) {
+ timeline_animator_.SetDuration(low_gfx ? 0 : FADE_DURATION);
+ }, *this));
form_factor_changed_ = Settings::Instance().form_factor.changed.connect([this] (FormFactor)
{
diff --git a/launcher/CairoBaseWindow.cpp b/launcher/CairoBaseWindow.cpp
index 57af11b06..83472e202 100644
--- a/launcher/CairoBaseWindow.cpp
+++ b/launcher/CairoBaseWindow.cpp
@@ -51,6 +51,10 @@ CairoBaseWindow::CairoBaseWindow(int monitor)
SetWindowSizeMatchLayout(true);
sigVisible.connect([this] (BaseWindow*) { compute_blur_bkg_ = true; });
+ Settings::Instance().low_gfx.changed.connect(sigc::track_obj([this] (bool low_gfx) {
+ fade_animator_.SetDuration(low_gfx ? 0 : FADE_DURATION);
+ }, *this));
+
fade_animator_.updated.connect(sigc::mem_fun(this, &BaseWindow::SetOpacity));
fade_animator_.finished.connect([this] {
if (animation::GetDirection(fade_animator_) == animation::Direction::BACKWARD)
diff --git a/launcher/LauncherController.cpp b/launcher/LauncherController.cpp
index ef9e47e30..5fb288299 100644
--- a/launcher/LauncherController.cpp
+++ b/launcher/LauncherController.cpp
@@ -156,14 +156,10 @@ Controller::Impl::Impl(Controller* parent, XdndManager::Ptr const& xdnd_manager,
WindowManager& wm = WindowManager::Default();
wm.window_focus_changed.connect(sigc::mem_fun(this, &Controller::Impl::OnWindowFocusChanged));
-#if SIGCXX_MAJOR_VERSION >= 2 && SIGCXX_MINOR_VERSION >= 5
wm.viewport_layout_changed.connect(sigc::track_obj([this] (int w, int h) { UpdateNumWorkspaces(w * h); }, *this));
-#else
- wm.viewport_layout_changed.connect(sigc::group(sigc::mem_fun(this, &Controller::Impl::UpdateNumWorkspaces), sigc::_1 * sigc::_2));
-#endif
- average_color_connection_ = wm.average_color.changed.connect([this] (nux::Color const& color) {
+ wm.average_color.changed.connect(sigc::track_obj([this] (nux::Color const& color) {
parent_->options()->background_color = color;
- });
+ }, *this));
ubus.RegisterInterest(UBUS_QUICKLIST_END_KEY_NAV, [this](GVariant * args) {
reactivate_index = model_->SelectionIndex();
diff --git a/launcher/LauncherControllerPrivate.h b/launcher/LauncherControllerPrivate.h
index 2596d212e..11496bfd1 100644
--- a/launcher/LauncherControllerPrivate.h
+++ b/launcher/LauncherControllerPrivate.h
@@ -151,7 +151,6 @@ public:
connection::Wrapper launcher_key_press_connection_;
connection::Wrapper launcher_event_outside_connection_;
connection::Wrapper launcher_key_nav_terminate_;
- connection::Wrapper average_color_connection_;
};
} // launcher namespace
diff --git a/launcher/SwitcherController.cpp b/launcher/SwitcherController.cpp
index 19376e382..dc31784a6 100644
--- a/launcher/SwitcherController.cpp
+++ b/launcher/SwitcherController.cpp
@@ -292,6 +292,10 @@ Controller::Impl::Impl(Controller* obj,
HideWindow();
}
});
+
+ Settings::Instance().low_gfx.changed.connect(sigc::track_obj([this] (bool low_gfx) {
+ fade_animator_.SetDuration(low_gfx ? 0 : FADE_DURATION);
+ }, *this));
}
void Controller::Impl::OnBackgroundUpdate(nux::Color const& new_color)
diff --git a/lockscreen/LockScreenController.cpp b/lockscreen/LockScreenController.cpp
index 5958bbbed..0818f21a9 100644
--- a/lockscreen/LockScreenController.cpp
+++ b/lockscreen/LockScreenController.cpp
@@ -84,6 +84,7 @@ Controller::Controller(DBusManager::Ptr const& dbus_manager,
});
hidden_window_connection_->block();
+ suspend_inhibitor_manager_->connected.connect(sigc::mem_fun(this, &Controller::SyncInhibitor));
suspend_inhibitor_manager_->about_to_suspend.connect([this] () {
if (Settings::Instance().lock_on_suspend())
session_manager_->PromptLockScreen();
@@ -91,7 +92,9 @@ Controller::Controller(DBusManager::Ptr const& dbus_manager,
Settings::Instance().lock_on_suspend.changed.connect(sigc::hide(sigc::mem_fun(this, &Controller::SyncInhibitor)));
Settings::Instance().use_legacy.changed.connect(sigc::hide(sigc::mem_fun(this, &Controller::SyncInhibitor)));
- suspend_inhibitor_manager_->connected.connect(sigc::mem_fun(this, &Controller::SyncInhibitor));
+ unity::Settings::Instance().low_gfx.changed.connect(sigc::track_obj([this] (bool low_gfx) {
+ fade_animator_.SetDuration(low_gfx ? 0 : LOCK_FADE_DURATION);
+ }, *this));
dbus_manager_->simulate_activity.connect(sigc::mem_fun(this, &Controller::SimulateActivity));
session_manager_->screensaver_requested.connect(sigc::mem_fun(this, &Controller::OnScreenSaverActivationRequest));
diff --git a/shortcuts/ShortcutController.cpp b/shortcuts/ShortcutController.cpp
index 82ee3b883..fb15ed595 100644
--- a/shortcuts/ShortcutController.cpp
+++ b/shortcuts/ShortcutController.cpp
@@ -58,6 +58,11 @@ Controller::Controller(BaseWindowRaiser::Ptr const& base_window_raiser,
if (animation::GetDirection(fade_animator_) == animation::Direction::BACKWARD)
view_window_->ShowWindow(false);
});
+
+ Settings::Instance().low_gfx.changed.connect(sigc::track_obj([this] (bool low_gfx) {
+ fade_animator_.SetDuration(low_gfx ? 0 : FADE_DURATION);
+ }, *this));
+
modeller_->model_changed.connect(sigc::mem_fun(this, &Controller::OnModelUpdated));
}
diff --git a/shutdown/SessionController.cpp b/shutdown/SessionController.cpp
index 1603f5d57..381262ba6 100644
--- a/shutdown/SessionController.cpp
+++ b/shutdown/SessionController.cpp
@@ -62,6 +62,10 @@ Controller::Controller(session::Manager::Ptr const& manager)
if (animation::GetDirection(fade_animator_) == animation::Direction::BACKWARD)
CloseWindow();
});
+
+ Settings::Instance().low_gfx.changed.connect(sigc::track_obj([this] (bool low_gfx) {
+ fade_animator_.SetDuration(low_gfx ? 0 : FADE_DURATION);
+ }, *this));
}
void Controller::OnBackgroundUpdate(nux::Color const& new_color)
diff --git a/unity-shared/SpreadFilter.cpp b/unity-shared/SpreadFilter.cpp
index 8bd2a1605..c646da46c 100644
--- a/unity-shared/SpreadFilter.cpp
+++ b/unity-shared/SpreadFilter.cpp
@@ -110,6 +110,10 @@ Filter::Filter()
}
});
+ Settings::Instance().low_gfx.changed.connect(sigc::track_obj([this] (bool low_gfx) {
+ fade_animator_.SetDuration(low_gfx ? 0 : FADE_DURATION);
+ }, *this));
+
ApplicationManager::Default().window_opened.connect(sigc::hide(sigc::mem_fun(this, &Filter::OnWindowChanged)));
}