~ci-train-bot/unity/unity-ubuntu-xenial-2841

« back to all changes in this revision

Viewing changes to lockscreen/LockScreenController.cpp

  • Committer: Bileto Bot
  • Date: 2016-07-15 10:14:23 UTC
  • mfrom: (4108.1.21 x-sru2)
  • Revision ID: ci-train-bot@canonical.com-20160715101423-5u56w0qyzfd79ml2
* PanelView: Don't draw it if the geo doesn't intersect the monitor
  geo (as in ezoom)
* speeds up the showdesktop plugin in lowgfx mode
* Add whitelist for auto-repated keys. (LP: #1586491)
* Fix scale window activation if in show desktop mode. (LP: #1582056)
* Order matters in the rendering. Draw launcher shadow after the
  background in all cases. (LP: #1586374)
* Fallback to volume name if no other identifier is available. (LP:
  #1103593)
* Do not trigger screensaver on session inactive. (LP: #1587507)
* Use SwitcherController::SetDetail instead of detail=... (LP:
  #1587618)
* UnitySettings: Add an option to enable/disable pam account checking.
  (LP: #1460649)
* Lockscreen: Make sure warning and errors are properly shown to the
  user (LP: #1593696)
* Add missing header to fix compilation error with -Duse_pch=OFF.
* Filter out fullscreen window in show desktop mode. (LP: #1597706)
* Make sure file manager icon is not removed when unpinned. (LP:
  #1578792)
* Properly calculate the intersection geometry in PanelView::Draw.
  This is needed to properly call SyncGeometries and to avoid problems
  such as lp:1595698. (LP: #1595698)
* UnitySettings: Add dconf keys for disabling multitouch gestures (LP:
  #1589520)
* LockScreenAcceleratorController: use key::Grabber to handle allowed
  bindings (LP: #1438754)
* LockScreenAcceleratorController: check if a setting key is available
  instead of crashing
* ApplicationLauncherIcon: ensure quirks are properly set on icon
  initialization
* Views: Toggle animators durations based on low-gfx setting (LP:
  #1598770)
* unity7.conf: use different compiz profile based on
  unity_support_test result (LP: #1598770)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include "LockScreenShield.h"
29
29
#include "LockScreenSettings.h"
30
30
#include "unity-shared/AnimationUtils.h"
 
31
#include "unity-shared/UnitySettings.h"
31
32
#include "unity-shared/UScreen.h"
32
33
#include "unity-shared/WindowManager.h"
33
34
 
54
55
 
55
56
Controller::Controller(DBusManager::Ptr const& dbus_manager,
56
57
                       session::Manager::Ptr const& session_manager,
 
58
                       key::Grabber::Ptr const& key_grabber,
57
59
                       UpstartWrapper::Ptr const& upstart_wrapper,
58
60
                       ShieldFactoryInterface::Ptr const& shield_factory,
59
61
                       bool test_mode)
60
62
  : opacity([this] { return fade_animator_.GetCurrentValue(); })
61
63
  , dbus_manager_(dbus_manager)
62
64
  , session_manager_(session_manager)
 
65
  , key_grabber_(key_grabber)
63
66
  , upstart_wrapper_(upstart_wrapper)
64
67
  , shield_factory_(shield_factory)
65
68
  , suspend_inhibitor_manager_(std::make_shared<SuspendInhibitorManager>())
66
 
  , fade_animator_(LOCK_FADE_DURATION)
 
69
  , fade_animator_(unity::Settings::Instance().low_gfx() ? 0 : LOCK_FADE_DURATION)
67
70
  , blank_window_animator_(IDLE_FADE_DURATION)
68
71
  , test_mode_(test_mode)
69
72
  , prompt_activation_(false)
81
84
  });
82
85
  hidden_window_connection_->block();
83
86
 
 
87
  suspend_inhibitor_manager_->connected.connect(sigc::mem_fun(this, &Controller::SyncInhibitor));
84
88
  suspend_inhibitor_manager_->about_to_suspend.connect([this] () {
85
89
    if (Settings::Instance().lock_on_suspend())
86
90
      session_manager_->PromptLockScreen();
88
92
 
89
93
  Settings::Instance().lock_on_suspend.changed.connect(sigc::hide(sigc::mem_fun(this, &Controller::SyncInhibitor)));
90
94
  Settings::Instance().use_legacy.changed.connect(sigc::hide(sigc::mem_fun(this, &Controller::SyncInhibitor)));
91
 
  suspend_inhibitor_manager_->connected.connect(sigc::mem_fun(this, &Controller::SyncInhibitor));
 
95
  unity::Settings::Instance().low_gfx.changed.connect(sigc::track_obj([this] (bool low_gfx) {
 
96
    fade_animator_.SetDuration(low_gfx ? 0 : LOCK_FADE_DURATION);
 
97
  }, *this));
92
98
 
93
99
  dbus_manager_->simulate_activity.connect(sigc::mem_fun(this, &Controller::SimulateActivity));
94
100
  session_manager_->screensaver_requested.connect(sigc::mem_fun(this, &Controller::OnScreenSaverActivationRequest));
459
465
  indicators_ = std::make_shared<indicator::LockScreenDBusIndicators>();
460
466
  upstart_wrapper_->Emit("desktop-lock");
461
467
 
462
 
  accelerator_controller_ = std::make_shared<AcceleratorController>(session_manager_);
 
468
  accelerator_controller_ = std::make_shared<AcceleratorController>(key_grabber_);
463
469
  auto activate_key = WindowManager::Default().activate_indicators_key();
464
470
  auto accelerator = std::make_shared<Accelerator>(activate_key.second, 0, activate_key.first);
465
471
  accelerator->activated.connect(std::bind(std::mem_fn(&Controller::ActivatePanel), this));