Mir

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

Proposed by Alan Griffiths on 2017-07-18
Status: Merged
Approved by: Chris Halse Rogers on 2017-07-19
Approved revision: 4206
Merged at revision: 4206
Proposed branch: lp:~alan-griffiths/mir/fix-1704949
Merge into: lp:mir
Diff against target: 57 lines (+6/-6)
1 file modified
src/client/mir_connection.cpp (+6/-6)
To merge this branch: bzr merge lp:~alan-griffiths/mir/fix-1704949
Reviewer Review Type Date Requested Status
Chris Halse Rogers 2017-07-18 Approve on 2017-07-19
Mir CI Bot continuous-integration Approve on 2017-07-18
Review via email: mp+327602@code.launchpad.net

Commit message

Only notify resize events for valid surfaces

To post a comment you must log in.
Alan Griffiths (alan-griffiths) wrote :

This is the real change:

- if (spec.width.is_set() && spec.height.is_set() && spec.event_handler.is_set())
+ if (MirWindow::is_valid(surf.get()) && spec.width.is_set() && spec.height.is_set() && spec.event_handler.is_set())

the rest is trailing whitespace

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

PASSED: Continuous integration, rev:4206
https://mir-jenkins.ubuntu.com/job/mir-ci/3491/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4767
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4939
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/4928
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/4928
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4928
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4804
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4804/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4804
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4804/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4804
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4804/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/4804
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/4804/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4804
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4804/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4804
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4804/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4804
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4804/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/4804
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/4804/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Chris Halse Rogers (raof) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/client/mir_connection.cpp'
2--- src/client/mir_connection.cpp 2017-06-30 11:32:37 +0000
3+++ src/client/mir_connection.cpp 2017-07-18 09:14:14 +0000
4@@ -378,7 +378,7 @@
5 surface_requests.emplace_back(c);
6 }
7
8- try
9+ try
10 {
11 server.create_surface(&message, c->response.get(),
12 gp::NewCallback(this, &MirConnection::surface_created, c.get()));
13@@ -419,7 +419,7 @@
14 if (request_it == surface_requests.end())
15 return;
16
17- auto surface_proto = request->response;
18+ auto surface_proto = request->response;
19 auto callback = request->cb;
20 auto context = request->context;
21 auto const& spec = request->spec;
22@@ -456,7 +456,7 @@
23 reason += surface_proto->error();
24 if (surface_proto->has_error() && !surface_proto->has_id())
25 reason += " and ";
26- if (!surface_proto->has_id())
27+ if (!surface_proto->has_id())
28 reason += "Server assigned surface no id";
29 auto id = next_error_id(lock);
30 surf = std::make_shared<MirWindow>(reason, this, id, request->wh);
31@@ -471,7 +471,7 @@
32
33 callback(surf.get(), context);
34
35- if (spec.width.is_set() && spec.height.is_set() && spec.event_handler.is_set())
36+ if (MirWindow::is_valid(surf.get()) && spec.width.is_set() && spec.height.is_set() && spec.event_handler.is_set())
37 {
38 mir::geometry::Size requested_size{spec.width.value(), spec.height.value()};
39 mir::geometry::Size actual_size{(*surface_proto).width(), (*surface_proto).height()};
40@@ -569,7 +569,7 @@
41 callback(surface, context);
42 auto id = surface->id();
43 surface_map->erase(mf::SurfaceId(id));
44- return raw_wait_handle;
45+ return raw_wait_handle;
46 }
47
48 SurfaceRelease surf_release{surface, raw_wait_handle, callback, context};
49@@ -1299,7 +1299,7 @@
50 callback, context);
51 server.allocate_buffers(&request, ignored.get(), gp::NewCallback(ignore));
52 }
53-
54+
55 void MirConnection::allocate_buffer(
56 geom::Size size, uint32_t native_format, uint32_t native_flags,
57 MirBufferCallback callback, void* context)

Subscribers

People subscribed via source and target branches