Merge lp:~mir-team/unity-system-compositor/touchspot-toggling into lp:unity-system-compositor

Proposed by Robert Carr
Status: Merged
Approved by: Cemil Azizoglu
Approved revision: 176
Merged at revision: 177
Proposed branch: lp:~mir-team/unity-system-compositor/touchspot-toggling
Merge into: lp:unity-system-compositor
Diff against target: 90 lines (+23/-1)
6 files modified
debian/control (+1/-1)
src/dbus_screen.cpp (+5/-0)
src/dbus_screen.h (+2/-0)
src/dbus_screen_observer.h (+1/-0)
src/screen_state_handler.cpp (+12/-0)
src/screen_state_handler.h (+2/-0)
To merge this branch: bzr merge lp:~mir-team/unity-system-compositor/touchspot-toggling
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Cemil Azizoglu (community) Approve
Alberto Aguirre (community) Approve
Review via email: mp+233742@code.launchpad.net

Commit message

Implement DBus interface for toggling touch visualization as required by autopilot.

Description of the change

Implement DBus interface for toggling touch visualization as required by autopilot.

Depends on:
https://code.launchpad.net/~mir-team/mir/touchspot-renderable/+merge/228775

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

Looks good to me.

review: Approve
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

I guess we'll land this on utopic in the same silo as Mir 0.8. Robert, I'd appreciate a reminder please.

review: Approve
174. By Robert Carr

Merge upstream

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

Instead of devel-mir-next, I'll just use this branch. Can you please bump the server ABI dependency in this MP in addition to addressing the jenkins failure?

review: Needs Fixing
175. By Robert Carr

Bump mir dependency

Revision history for this message
Robert Carr (robertcarr) wrote :

Jenkins failure is just the lack of latest server ABI. Bumped dependency, should be good.

176. By Robert Carr

No need to bump client version dep

Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

LG.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Robert Carr (robertcarr) wrote :

Jenkins failure is the version bump working.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2014-07-23 17:54:25 +0000
3+++ debian/control 2014-09-29 20:23:42 +0000
4@@ -18,7 +18,7 @@
5 libglib2.0-dev,
6 libgles2-mesa-dev,
7 libmirclient-dev (>= 0.6.0),
8- libmirserver-dev (>= 0.6.0),
9+ libmirserver-dev (>= 0.8.0),
10 libprotobuf-dev,
11 pkg-config,
12 python:any (>= 2.7),
13
14=== modified file 'src/dbus_screen.cpp'
15--- src/dbus_screen.cpp 2014-09-16 15:03:49 +0000
16+++ src/dbus_screen.cpp 2014-09-29 20:23:42 +0000
17@@ -206,3 +206,8 @@
18 {
19 observer->set_inactivity_timeouts(poweroff_timeout, dimmer_timeout);
20 }
21+
22+void DBusScreen::setTouchVisualizationEnabled(bool enabled)
23+{
24+ observer->set_touch_visualization_enabled(enabled);
25+}
26
27=== modified file 'src/dbus_screen.h'
28--- src/dbus_screen.h 2014-09-16 00:20:05 +0000
29+++ src/dbus_screen.h 2014-09-29 20:23:42 +0000
30@@ -57,6 +57,8 @@
31 void userAutobrightnessEnable(bool enable);
32
33 void setInactivityTimeouts(int poweroff_timeout, int dimmer_timeout);
34+
35+ void setTouchVisualizationEnabled(bool enabled);
36
37 private Q_SLOTS:
38 void remove_display_on_requestor(QString const& requestor);
39
40=== modified file 'src/dbus_screen_observer.h'
41--- src/dbus_screen_observer.h 2014-08-14 16:06:33 +0000
42+++ src/dbus_screen_observer.h 2014-09-29 20:23:42 +0000
43@@ -29,6 +29,7 @@
44 virtual void set_brightness(int brightness) = 0;
45 virtual void enable_auto_brightness(bool enable) = 0;
46 virtual void set_inactivity_timeouts(int poweroff_timeout, int dimmer_timeout) = 0;
47+ virtual void set_touch_visualization_enabled(bool enabled) = 0;
48
49 protected:
50 DBusScreenObserver() = default;
51
52=== modified file 'src/screen_state_handler.cpp'
53--- src/screen_state_handler.cpp 2014-09-05 18:11:43 +0000
54+++ src/screen_state_handler.cpp 2014-09-29 20:23:42 +0000
55@@ -22,6 +22,7 @@
56 #include <mir/default_server_configuration.h>
57 #include <mir/graphics/display.h>
58 #include <mir/graphics/display_configuration.h>
59+#include <mir/input/touch_visualizer.h>
60
61 #include <cstdio>
62 #include "dbus_screen.h"
63@@ -223,3 +224,14 @@
64 std::lock_guard<std::mutex> lock{guard};
65 powerd_mediator->set_dim_backlight();
66 }
67+
68+void ScreenStateHandler::set_touch_visualization_enabled(bool enabled)
69+{
70+ std::lock_guard<std::mutex> lock{guard};
71+
72+ auto visualizer = config->the_touch_visualizer();
73+ if (enabled)
74+ visualizer->enable();
75+ else
76+ visualizer->disable();
77+}
78
79=== modified file 'src/screen_state_handler.h'
80--- src/screen_state_handler.h 2014-08-14 18:40:25 +0000
81+++ src/screen_state_handler.h 2014-09-29 20:23:42 +0000
82@@ -57,6 +57,8 @@
83 void set_brightness(int brightness) override;
84 void enable_auto_brightness(bool enable) override;
85 void set_inactivity_timeouts(int power_off_timeout, int dimmer_timeout) override;
86+
87+ void set_touch_visualization_enabled(bool enabled) override;
88
89 private:
90 void set_screen_power_mode_l(MirPowerMode mode, PowerStateChangeReason reason);

Subscribers

People subscribed via source and target branches