~unity-team/unity/trusty-1305440

« back to all changes in this revision

Viewing changes to lockscreen/LockScreenController.cpp

  • Committer: CI bot
  • Author(s): Stephen M. Webb, Marco Trevisan (Treviño), Andrea Azzarone, Pawel Szubert, Chris Townsend, Andrea Azzarone, Eleni Maria Stea
  • Date: 2014-08-26 13:48:28 UTC
  • mfrom: (3800.1.24 prepare-7.2.3-SRU)
  • Revision ID: ps-jenkins@lists.canonical.com-20140826134828-fkev1oisyfl9kbt3
Prepare fixes for upstream micro-release 7.2.3. Fixes: 1283415, 1292391, 1306211, 1312107, 1320051, 1320071, 1324114, 1339629, 1340171, 1340394, 1340477, 1340992, 1340996, 1342208, 1342731, 1347735

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
  bool AcceptKeyNavFocus() override { return true; }
46
46
  bool InspectKeyEvent(unsigned int, unsigned int, const char*) override { return true; };
47
47
};
48
 
}
49
48
 
50
49
DECLARE_LOGGER(logger, "unity.lockscreen");
 
50
}
51
51
 
52
52
Controller::Controller(DBusManager::Ptr const& dbus_manager,
53
53
                       session::Manager::Ptr const& session_manager,
104
104
      key_connection_->disconnect();
105
105
      uscreen_connection_->block();
106
106
      hidden_window_connection_->block();
107
 
      session_manager_->unlocked.emit();
 
107
      session_manager_->is_locked = false;
108
108
 
109
109
      std::for_each(shields_.begin(), shields_.end(), [](nux::ObjectPtr<Shield> const& shield) {
110
110
        shield->RemoveLayout();
203
203
      is_new = true;
204
204
    }
205
205
 
206
 
    shield->SetGeometry(monitors[i]);
207
 
    shield->SetMinMaxSize(monitors[i].width, monitors[i].height);
 
206
    auto old_geo = shield->GetGeometry();
 
207
    auto new_geo = monitors[i];
 
208
 
 
209
    shield->SetGeometry(new_geo);
 
210
    shield->SetMinMaxSize(new_geo.width, new_geo.height);
208
211
    shield->primary = (i == primary);
209
212
    shield->monitor = i;
210
213
 
 
214
    // XXX: manually emit nux::Area::geometry_changed beucase nux can fail to emit it.
 
215
    if (old_geo != new_geo)
 
216
      shield->geometry_changed.emit(shield.GetPointer(), new_geo);
 
217
 
211
218
    if (is_new && fade_animator_.GetCurrentValue() > 0)
212
219
    {
213
220
      shield->SetOpacity(fade_animator_.GetCurrentValue());
342
349
      HideBlankWindow();
343
350
 
344
351
    LockScreen();
345
 
    session_manager_->locked.emit();
 
352
    session_manager_->is_locked = true;
346
353
 
347
354
    if (prompt_activation_)
348
355
    {
403
410
  indicators_ = std::make_shared<indicator::LockScreenDBusIndicators>();
404
411
  upstart_wrapper_->Emit("desktop-lock");
405
412
 
406
 
  accelerator_controller_ = std::make_shared<AcceleratorController>();
 
413
  accelerator_controller_ = std::make_shared<AcceleratorController>(session_manager_);
407
414
  auto activate_key = WindowManager::Default().activate_indicators_key();
408
415
  auto accelerator = std::make_shared<Accelerator>(activate_key.second, 0, activate_key.first);
409
416
  accelerator->activated.connect(std::bind(std::mem_fn(&Controller::ActivatePanel), this));