~3v1n0/unity/cairobaswindow-better-damage

« back to all changes in this revision

Viewing changes to shutdown/SessionController.h

  • Committer: Tarmac
  • Author(s): Marco Trevisan (Treviño)
  • Date: 2013-09-25 17:18:05 UTC
  • mfrom: (3530.1.8 trunk)
  • Revision ID: tarmac-20130925171805-wdfr0yz06uttclna
Unity: Use WindowManager average_color property for getting the desktop color

Having to deal with UBus here was a mess and caused us to re-store the same value
too many times. Using a nux property gives us all the features we need easily
while WindowManager is already enough shared to be used for this task.

Approved by PS Jenkins bot, Brandon Schaefer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include <UnityCore/SessionManager.h>
31
31
 
32
32
#include "SessionView.h"
33
 
#include "unity-shared/UBusWrapper.h"
34
33
 
35
34
namespace unity
36
35
{
37
36
namespace session
38
37
{
39
38
 
40
 
class Controller : public debug::Introspectable
 
39
class Controller : public debug::Introspectable, public sigc::trackable
41
40
{
42
41
public:
43
42
  typedef std::shared_ptr<Controller> Ptr;
63
62
  void ConstructView();
64
63
  void EnsureView();
65
64
  void CloseWindow();
66
 
  void OnBackgroundUpdate(GVariant* data);
 
65
  void OnBackgroundUpdate(nux::Color const&);
67
66
  nux::Point GetOffsetPerMonitor(int monitor);
68
67
 
69
68
  View::Ptr view_;
71
70
  nux::Point adjustment_;
72
71
  session::Manager::Ptr manager_;
73
72
 
74
 
  nux::Color bg_color_;
75
 
 
76
73
  nux::animation::AnimateValue<double> fade_animator_;
77
 
  UBusManager ubus_manager_;
78
74
};
79
75
 
80
76
}