Merge lp:~robertcarr/unity-system-compositor/add-cursor-option into lp:unity-system-compositor

Proposed by kevin gunn
Status: Merged
Merged at revision: 127
Proposed branch: lp:~robertcarr/unity-system-compositor/add-cursor-option
Merge into: lp:unity-system-compositor
Diff against target: 41 lines (+15/-2)
1 file modified
src/system_compositor.cpp (+15/-2)
To merge this branch: bzr merge lp:~robertcarr/unity-system-compositor/add-cursor-option
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Andreas Pokorny (community) Approve
Stephen M. Webb (community) Approve
Review via email: mp+213896@code.launchpad.net

Commit message

allow hw cursor option

Description of the change

allow hw cursor use, needed for unity8 desktop preview

To post a comment you must log in.
Revision history for this message
Stephen M. Webb (bregma) wrote :

Stray character in line 9 of the diff. Conditional approval on fixing that.

This has been tested in a PPA.

review: Approve
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

looks fine

review: Approve
128. By Robert Carr

Remove stray n

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/system_compositor.cpp'
2--- src/system_compositor.cpp 2014-03-17 14:59:24 +0000
3+++ src/system_compositor.cpp 2014-04-02 18:54:38 +0000
4@@ -144,6 +144,11 @@
5 {
6 return the_options()->get("power-off-delay", 0);
7 }
8+
9+ bool enable_hardware_cursor()
10+ {
11+ return the_options()->get("enable-hardware-cursor", false);
12+ }
13
14 std::string blacklist()
15 {
16@@ -165,7 +170,14 @@
17 {
18 }
19 };
20- return std::make_shared<NullCursorListener>();
21+
22+ // This is a workaround for u8 desktop preview in 14.04 for the lack of client cursor API.
23+ // We need to disable the cursor for XMir but leave it on for the desktop preview.
24+ // Luckily as it stands they run inside seperate instances of USC. ~racarr
25+ if (enable_hardware_cursor())
26+ return mir::DefaultServerConfiguration::the_cursor_listener();
27+ else
28+ return std::make_shared<NullCursorListener>();
29 }
30
31 std::shared_ptr<mir::ServerStatusListener> the_server_status_listener() override
32@@ -232,7 +244,8 @@
33 ("blacklist", po::value<std::string>(), "Video blacklist regex to use")
34 ("version", "Show version of Unity System Compositor")
35 ("public-socket", po::value<bool>(), "Make the socket file publicly writable")
36- ("power-off-delay", po::value<int>(), "Delay in milliseconds before powering off screen [int]");
37+ ("power-off-delay", po::value<int>(), "Delay in milliseconds before powering off screen [int]")
38+ ("enable-hardware-cursor", po::value<bool>(), "Enable the hardware cursor (disabled by default)");
39 }
40
41 void parse_config_file(

Subscribers

People subscribed via source and target branches