Mir

Merge lp:~alan-griffiths/mir/fix-1663197 into lp:mir

Proposed by Alan Griffiths on 2017-02-09
Status: Merged
Approved by: Daniel van Vugt on 2017-02-10
Approved revision: 4020
Merged at revision: 4022
Proposed branch: lp:~alan-griffiths/mir/fix-1663197
Merge into: lp:mir
Diff against target: 92 lines (+20/-40)
3 files modified
examples/server_example_canonical_window_manager.cpp (+0/-20)
src/server/shell/abstract_shell.cpp (+20/-0)
src/server/shell/canonical_window_manager.cpp (+0/-20)
To merge this branch: bzr merge lp:~alan-griffiths/mir/fix-1663197
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Approve on 2017-02-10
Daniel van Vugt Approve on 2017-02-10
Kevin DuBois (community) Approve on 2017-02-09
Cemil Azizoglu (community) 2017-02-09 Approve on 2017-02-09
Review via email: mp+316866@code.launchpad.net

Commit message

Move the support for setting cursors from examples to libmirserver. (LP: #1663197)

To post a comment you must log in.
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4020
https://mir-jenkins.ubuntu.com/job/mir-ci/2970/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/3941
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4027
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4017
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4017
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4017
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3968
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3968/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/3968
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/3968/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3968
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3968/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3968
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3968/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/3968
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/3968/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/3968
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/3968/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/2970/rebuild

review: Approve (continuous-integration)
Cemil Azizoglu (cemil-azizoglu) wrote :

lgtm

review: Approve
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://mir-jenkins.ubuntu.com/job/mir-autolanding/1086/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/3944/console
    None: https://mir-jenkins.ubuntu.com/job/generic-land-mp/1147/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4030
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4020
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4020
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4020
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3971
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3971/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/3971/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3971/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3971
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3971/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/3971
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/3971/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/3971
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/3971/artifact/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)
Kevin DuBois (kdub) wrote :

lgtm

review: Approve
Daniel van Vugt (vanvugt) wrote :

Sure, why not?

review: Approve
Daniel van Vugt (vanvugt) wrote :

^^^
Jenkins failures are bug 1646375 and bug 1661187

Mir CI Bot (mir-ci-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/server_example_canonical_window_manager.cpp'
2--- examples/server_example_canonical_window_manager.cpp 2017-01-18 02:29:37 +0000
3+++ examples/server_example_canonical_window_manager.cpp 2017-02-09 16:12:25 +0000
4@@ -421,26 +421,6 @@
5 {
6 surface->set_confine_pointer_state(modifications.confine_pointer.value());
7 }
8-
9- if (modifications.cursor_image.is_set())
10- {
11- surface->set_cursor_image(modifications.cursor_image.value());
12- }
13-
14- if (modifications.stream_cursor.is_set())
15- {
16- auto stream_id = modifications.stream_cursor.value().stream_id;
17- if (stream_id != mir::frontend::BufferStreamId{-1})
18- {
19- auto hotspot = modifications.stream_cursor.value().hotspot;
20- auto stream = session->get_buffer_stream(modifications.stream_cursor.value().stream_id);
21- surface->set_cursor_stream(stream, hotspot);
22- }
23- else
24- {
25- surface->set_cursor_image({});
26- }
27- }
28 }
29
30 void me::CanonicalWindowManagerPolicyCopy::handle_delete_surface(std::shared_ptr<ms::Session> const& session, std::weak_ptr<ms::Surface> const& surface)
31
32=== modified file 'src/server/shell/abstract_shell.cpp'
33--- src/server/shell/abstract_shell.cpp 2017-01-30 05:18:36 +0000
34+++ src/server/shell/abstract_shell.cpp 2017-02-09 16:12:25 +0000
35@@ -161,6 +161,26 @@
36 window_manager->modify_surface(session, surface, wm_relevant_mods);
37 }
38
39+ if (modifications.cursor_image.is_set())
40+ {
41+ surface->set_cursor_image(modifications.cursor_image.value());
42+ }
43+
44+ if (modifications.stream_cursor.is_set())
45+ {
46+ auto stream_id = modifications.stream_cursor.value().stream_id;
47+ if (stream_id != mir::frontend::BufferStreamId{-1})
48+ {
49+ auto hotspot = modifications.stream_cursor.value().hotspot;
50+ auto stream = session->get_buffer_stream(modifications.stream_cursor.value().stream_id);
51+ surface->set_cursor_stream(stream, hotspot);
52+ }
53+ else
54+ {
55+ surface->set_cursor_image({});
56+ }
57+ }
58+
59 if (modifications.confine_pointer.is_set() && focused_surface() == surface)
60 {
61 if (surface->confine_pointer_state() == mir_pointer_confined_to_window)
62
63=== modified file 'src/server/shell/canonical_window_manager.cpp'
64--- src/server/shell/canonical_window_manager.cpp 2017-01-20 12:32:45 +0000
65+++ src/server/shell/canonical_window_manager.cpp 2017-02-09 16:12:25 +0000
66@@ -413,26 +413,6 @@
67 {
68 surface->set_confine_pointer_state(modifications.confine_pointer.value());
69 }
70-
71- if (modifications.cursor_image.is_set())
72- {
73- surface->set_cursor_image(modifications.cursor_image.value());
74- }
75-
76- if (modifications.stream_cursor.is_set())
77- {
78- auto stream_id = modifications.stream_cursor.value().stream_id;
79- if (stream_id != mir::frontend::BufferStreamId{-1})
80- {
81- auto hotspot = modifications.stream_cursor.value().hotspot;
82- auto stream = session->get_buffer_stream(modifications.stream_cursor.value().stream_id);
83- surface->set_cursor_stream(stream, hotspot);
84- }
85- else
86- {
87- surface->set_cursor_image({});
88- }
89- }
90 }
91
92 void msh::CanonicalWindowManagerPolicy::handle_delete_surface(std::shared_ptr<ms::Session> const& session, std::weak_ptr<ms::Surface> const& surface)

Subscribers

People subscribed via source and target branches