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
=== modified file 'examples/server_example_canonical_window_manager.cpp'
--- examples/server_example_canonical_window_manager.cpp 2017-01-18 02:29:37 +0000
+++ examples/server_example_canonical_window_manager.cpp 2017-02-09 16:12:25 +0000
@@ -421,26 +421,6 @@
421 {421 {
422 surface->set_confine_pointer_state(modifications.confine_pointer.value());422 surface->set_confine_pointer_state(modifications.confine_pointer.value());
423 }423 }
424
425 if (modifications.cursor_image.is_set())
426 {
427 surface->set_cursor_image(modifications.cursor_image.value());
428 }
429
430 if (modifications.stream_cursor.is_set())
431 {
432 auto stream_id = modifications.stream_cursor.value().stream_id;
433 if (stream_id != mir::frontend::BufferStreamId{-1})
434 {
435 auto hotspot = modifications.stream_cursor.value().hotspot;
436 auto stream = session->get_buffer_stream(modifications.stream_cursor.value().stream_id);
437 surface->set_cursor_stream(stream, hotspot);
438 }
439 else
440 {
441 surface->set_cursor_image({});
442 }
443 }
444}424}
445425
446void me::CanonicalWindowManagerPolicyCopy::handle_delete_surface(std::shared_ptr<ms::Session> const& session, std::weak_ptr<ms::Surface> const& surface)426void me::CanonicalWindowManagerPolicyCopy::handle_delete_surface(std::shared_ptr<ms::Session> const& session, std::weak_ptr<ms::Surface> const& surface)
447427
=== modified file 'src/server/shell/abstract_shell.cpp'
--- src/server/shell/abstract_shell.cpp 2017-01-30 05:18:36 +0000
+++ src/server/shell/abstract_shell.cpp 2017-02-09 16:12:25 +0000
@@ -161,6 +161,26 @@
161 window_manager->modify_surface(session, surface, wm_relevant_mods);161 window_manager->modify_surface(session, surface, wm_relevant_mods);
162 }162 }
163163
164 if (modifications.cursor_image.is_set())
165 {
166 surface->set_cursor_image(modifications.cursor_image.value());
167 }
168
169 if (modifications.stream_cursor.is_set())
170 {
171 auto stream_id = modifications.stream_cursor.value().stream_id;
172 if (stream_id != mir::frontend::BufferStreamId{-1})
173 {
174 auto hotspot = modifications.stream_cursor.value().hotspot;
175 auto stream = session->get_buffer_stream(modifications.stream_cursor.value().stream_id);
176 surface->set_cursor_stream(stream, hotspot);
177 }
178 else
179 {
180 surface->set_cursor_image({});
181 }
182 }
183
164 if (modifications.confine_pointer.is_set() && focused_surface() == surface)184 if (modifications.confine_pointer.is_set() && focused_surface() == surface)
165 {185 {
166 if (surface->confine_pointer_state() == mir_pointer_confined_to_window)186 if (surface->confine_pointer_state() == mir_pointer_confined_to_window)
167187
=== modified file 'src/server/shell/canonical_window_manager.cpp'
--- src/server/shell/canonical_window_manager.cpp 2017-01-20 12:32:45 +0000
+++ src/server/shell/canonical_window_manager.cpp 2017-02-09 16:12:25 +0000
@@ -413,26 +413,6 @@
413 {413 {
414 surface->set_confine_pointer_state(modifications.confine_pointer.value());414 surface->set_confine_pointer_state(modifications.confine_pointer.value());
415 }415 }
416
417 if (modifications.cursor_image.is_set())
418 {
419 surface->set_cursor_image(modifications.cursor_image.value());
420 }
421
422 if (modifications.stream_cursor.is_set())
423 {
424 auto stream_id = modifications.stream_cursor.value().stream_id;
425 if (stream_id != mir::frontend::BufferStreamId{-1})
426 {
427 auto hotspot = modifications.stream_cursor.value().hotspot;
428 auto stream = session->get_buffer_stream(modifications.stream_cursor.value().stream_id);
429 surface->set_cursor_stream(stream, hotspot);
430 }
431 else
432 {
433 surface->set_cursor_image({});
434 }
435 }
436}416}
437417
438void msh::CanonicalWindowManagerPolicy::handle_delete_surface(std::shared_ptr<ms::Session> const& session, std::weak_ptr<ms::Surface> const& surface)418void 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