Mir

Merge lp:~vanvugt/mir/async-is-not-sync into lp:mir

Proposed by Daniel van Vugt
Status: Rejected
Rejected by: Cemil Azizoglu
Proposed branch: lp:~vanvugt/mir/async-is-not-sync
Merge into: lp:mir
Prerequisite: lp:~mir-team/mir/rename-mir_window_create
Diff against target: 1348 lines (+132/-132)
52 files modified
benchmarks/frame-uniformity/touch_measuring_client.cpp (+1/-1)
examples/basic.c (+1/-1)
examples/client_helpers.cpp (+1/-1)
examples/eglapp.c (+1/-1)
examples/fingerpaint.c (+1/-1)
examples/flicker.c (+1/-1)
examples/multiwin.c (+3/-3)
examples/progressbar.c (+1/-1)
examples/release_at_exit.c (+1/-1)
examples/tooltip.c (+1/-1)
include/client/mir_toolkit/mir_screencast.h (+1/-1)
include/client/mir_toolkit/mir_surface.h (+20/-20)
playground/egldiamond_render_surface.c (+1/-1)
playground/mir_demo_client_chain_jumping_buffers.c (+1/-1)
playground/mir_demo_client_prerendered_frames.c (+1/-1)
playground/render_surface.cpp (+1/-1)
src/client/mir_surface_api.cpp (+5/-5)
src/client/symbols.map (+1/-1)
src/platforms/android/utils/test_android_hardware_sanity.cpp (+2/-2)
src/server/graphics/nested/mir_client_host_connection.cpp (+1/-1)
tests/acceptance-tests/test_buffer_stream_arrangement.cpp (+2/-2)
tests/acceptance-tests/test_client_cookie.cpp (+1/-1)
tests/acceptance-tests/test_client_cursor_api.cpp (+1/-1)
tests/acceptance-tests/test_client_focus_notification.cpp (+1/-1)
tests/acceptance-tests/test_client_input.cpp (+1/-1)
tests/acceptance-tests/test_client_library.cpp (+26/-26)
tests/acceptance-tests/test_client_library_errors.cpp (+5/-5)
tests/acceptance-tests/test_client_logging.cpp (+1/-1)
tests/acceptance-tests/test_client_surface_events.cpp (+2/-2)
tests/acceptance-tests/test_client_surface_visibility.cpp (+1/-1)
tests/acceptance-tests/test_client_surfaces.cpp (+11/-11)
tests/acceptance-tests/test_confined_pointer.cpp (+1/-1)
tests/acceptance-tests/test_custom_window_management.cpp (+8/-8)
tests/acceptance-tests/test_display_configuration.cpp (+1/-1)
tests/acceptance-tests/test_nested_mir.cpp (+1/-1)
tests/acceptance-tests/test_new_display_configuration.cpp (+1/-1)
tests/acceptance-tests/test_presentation_chain.cpp (+3/-3)
tests/acceptance-tests/test_render_surface.cpp (+3/-3)
tests/acceptance-tests/test_server_disconnect.cpp (+1/-1)
tests/acceptance-tests/test_surface_morphing.cpp (+1/-1)
tests/acceptance-tests/test_surface_placement.cpp (+2/-2)
tests/acceptance-tests/test_system_compositor_window_manager.cpp (+1/-1)
tests/integration-tests/client/test_mirsurface.cpp (+1/-1)
tests/integration-tests/test_error_reporting.cpp (+1/-1)
tests/integration-tests/test_surfaceloop.cpp (+2/-2)
tests/mir_test_framework/any_surface.cpp (+1/-1)
tests/mir_test_framework/connected_client_with_a_surface.cpp (+1/-1)
tests/mir_test_framework/visible_surface.cpp (+1/-1)
tests/performance-tests/test_client_startup.cpp (+1/-1)
tests/privileged-tests/test_input_events.cpp (+1/-1)
tests/test-clients/impolite-shutdown/scroll.cpp (+1/-1)
tests/test-clients/mir-stress/src/client.cpp (+1/-1)
To merge this branch: bzr merge lp:~vanvugt/mir/async-is-not-sync
Reviewer Review Type Date Requested Status
Cemil Azizoglu (community) Disapprove
Andreas Pokorny (community) Disapprove
Mir CI Bot continuous-integration Approve
Alan Griffiths Needs Information
Alberto Aguirre (community) Approve
Review via email: mp+314797@code.launchpad.net

Commit message

Proof of concept to simplify spelling of the more commonly used synchronous functions:
   s/mir_create_window/mir_create_window_async/g
   s/mir_create_window_sync/mir_create_window/g

Description of the change

Request for comments. If people like this we can do it for other functions too.

I think it's important we discuss this now. If the main priority for 1.0 is to get the client API right...

Yes, I've modified the 0.26 ABI. If it lands then we can backport to lp:mir/0.26

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

PASSED: Continuous integration, rev:3936
https://mir-jenkins.ubuntu.com/job/mir-ci/2715/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/3530
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/3598
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/3588
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/3588
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/3588
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3557
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3557/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/3557
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/3557/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3557
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3557/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/3557
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3557/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/3557
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/3557/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/3557
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/3557/artifact/output/*zip*/output.zip

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

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

We don't really use async anywhere else. I prefer not to do this. If people like it I don't mind abstaining.

review: Disapprove
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I know we don't use it, but we should :) Wait to hear more thoughts...

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Apart from "too late now" there are two arguments:

/1/ the "sync" version is more common and should have the shorter name
/2/ the "sync" version is more specialized and should have the longer name

The former is certainly true of our test and example code. (I'm not sure of a good codebase to assess it in the real world.)

The latter is also true. It also calls out that call might take some significant time to return.

I'm marginally in favour of what we have now.

review: Disapprove
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

Just going by our current main toolkits, gdk and qtubuntu, both of those use _sync versions...

So approve based on current toolkit usage.

review: Approve
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

SDL also seems to prefer the *_sync versions.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

*Needs Discussion*

Hmm. If no downstream uses it should we simply remove the async option?

review: Needs Information
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

> *Needs Discussion*
>
> Hmm. If no downstream uses it should we simply remove the async option?

Maybe?

We can always introduce async methods later, after we have a good manual dispatch solution to address the callback safety concerns from a user's perspective.

Revision history for this message
Alberto Aguirre (albaguirre) wrote :

To add more things that use mir:

Kodi also uses *_sync functions...

content-hub uses apis in a synchronous fashion:
mir_wait_for(mir_prompt_session_new_fds_for_prompt_providers(
        d->m_mirSession, 1, client_fd_callback, d));

lp:~vanvugt/mir/async-is-not-sync updated
3937. By Daniel van Vugt

Merge latest trunk

3938. By Daniel van Vugt

Merge latest trunk and fix lots of conflicts

3939. By Daniel van Vugt

Remove dead code

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The manual dispatch problem is actually pretty simple. I solved it back in 2014 but decided not to propose the solution when I realized I had solved it using entirely public APIs (so it did not need to live in libmirclient at all)...
https://code.launchpad.net/~vanvugt/mir/event-queue/+merge/208563

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:3938
https://mir-jenkins.ubuntu.com/job/mir-ci/2765/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/3625/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/3700
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/3690
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/3690
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/3690
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3652
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3652/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/3652/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3652
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3652/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/3652
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3652/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/3652
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/3652/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/3652/console

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

^^^
Bug 1646558, plus WTF:

04:30:01 15: [ FAILED ] 3 tests, listed below:
04:30:01 15: [ FAILED ] FocusSelection.when_client_connects_shell_is_notified_of_session
04:30:01 15: [ FAILED ] Process.a_main_fn_is_executed
04:30:01 15: [ FAILED ] Process.a_successful_exit_function_succeeds

lp:~vanvugt/mir/async-is-not-sync updated
3940. By Daniel van Vugt

Try again

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3939
https://mir-jenkins.ubuntu.com/job/mir-ci/2767/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/3627
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/3702
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/3692
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/3692
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/3692
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3654
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3654/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/3654
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/3654/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3654
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3654/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/3654
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3654/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/3654
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/3654/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/3654
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/3654/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:3940
https://mir-jenkins.ubuntu.com/job/mir-ci/2769/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/3630/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/3705
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/3695
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/3695
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/3695
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3657
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3657/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/3657
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/3657/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3657/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3657
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3657/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/3657
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/3657/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/3657
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/3657/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
lp:~vanvugt/mir/async-is-not-sync updated
3941. By Daniel van Vugt

Merge latest trunk

Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3941
https://mir-jenkins.ubuntu.com/job/mir-ci/2770/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/3631
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/3706
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/3696
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/3696
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/3696
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3658
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/3658/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/3658
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/3658/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3658
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3658/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/3658
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3658/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/3658
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/3658/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/3658
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/3658/artifact/output/*zip*/output.zip

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

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

I think we should incentivise clients to use the async version.. and make clear which calls might include round-trips to the server. So I have a weak preference of the current state - async being the shorter version and "_sync" kind of standing out.

I think it would be more helpful to hand out an fd to make the toolkits or clients gain control over the dispatch.

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

This was discussed in the standup. I'll summarize the opinions against it to go with Alberto's favorable opinion above.

What you are proposing is to change not just what this MP changes but all the async/sync functions. This is a huge change (evidenced by the size of this branch just to change one of them). We do not have the time to do it in Mir 0.26 timeframe for sure - it's already late. Besides, toolkits have already written their code, and renaming to make their lives easier will make it harder for them because now they'd have to change their code to adapt to all the new names.

Another argument against this is that calling out 'sync' in the function name provides a visual clue for the user that this function may take longer than other functions that do not have 'sync' suffix (i.e. do not need to contact to server).

Yet another argument is that it's a lot of busy work for not enough gain (even if we didn't take the time crunch that we're in into account).

We can have a wider team discussion in an upcoming sprint to see if everyone can be convinced that this is a good idea.

review: Disapprove
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

That makes perfect, but partial sense.

The sole justification for looking at doing a 1.0 release soon was to get the API right. And this certainly comes under that heading. Although realistically I don't think we're going to get everything right in 1.0.

Your justification for rejecting this branch is actually a strong argument against the wide scale API breaks we've been pushing through at high speed recently. Indeed we've broken too much too quickly. If we acknowledge and accept that then I think this branch should be a part of it, and helps us to get the API closer to right.

Unmerged revisions

3941. By Daniel van Vugt

Merge latest trunk

3940. By Daniel van Vugt

Try again

3939. By Daniel van Vugt

Remove dead code

3938. By Daniel van Vugt

Merge latest trunk and fix lots of conflicts

3937. By Daniel van Vugt

Merge latest trunk

3936. By Daniel van Vugt

First attempt

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'benchmarks/frame-uniformity/touch_measuring_client.cpp'
2--- benchmarks/frame-uniformity/touch_measuring_client.cpp 2017-01-18 02:29:37 +0000
3+++ benchmarks/frame-uniformity/touch_measuring_client.cpp 2017-01-19 08:14:45 +0000
4@@ -40,7 +40,7 @@
5 mir_window_spec_set_name(spec, "frame-uniformity-test");
6 mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
7
8- auto window = mir_create_window_sync(spec);
9+ auto window = mir_create_window(spec);
10 mir_window_spec_release(spec);
11
12 if (!mir_window_is_valid(window))
13
14=== modified file 'examples/basic.c'
15--- examples/basic.c 2017-01-18 19:57:47 +0000
16+++ examples/basic.c 2017-01-19 08:14:45 +0000
17@@ -117,7 +117,7 @@
18
19 ///\internal [surface_create_tag]
20 // ...we create a surface using that format.
21- mcd.window = mir_create_window_sync(spec);
22+ mcd.window = mir_create_window(spec);
23 puts("Window created");
24 ///\internal [surface_create_tag]
25
26
27=== modified file 'examples/client_helpers.cpp'
28--- examples/client_helpers.cpp 2017-01-18 02:29:37 +0000
29+++ examples/client_helpers.cpp 2017-01-19 08:14:45 +0000
30@@ -155,7 +155,7 @@
31 mir_window_spec_set_pixel_format(spec.get(), selected_format);
32 mir_window_spec_set_name(spec.get(), __PRETTY_FUNCTION__);
33 mir_window_spec_set_buffer_usage(spec.get(), hardware ? mir_buffer_usage_hardware : mir_buffer_usage_software);
34- auto window = mir_create_window_sync(spec.get());
35+ auto window = mir_create_window(spec.get());
36 return window;
37 }
38
39
40=== modified file 'examples/eglapp.c'
41--- examples/eglapp.c 2017-01-18 02:29:37 +0000
42+++ examples/eglapp.c 2017-01-19 08:14:45 +0000
43@@ -487,7 +487,7 @@
44 if (output_id != mir_display_output_id_invalid)
45 mir_window_spec_set_fullscreen_on_output(spec, output_id);
46
47- window = mir_create_window_sync(spec);
48+ window = mir_create_window(spec);
49 mir_window_spec_release(spec);
50
51 CHECK(mir_window_is_valid(window), "Can't create a window");
52
53=== modified file 'examples/fingerpaint.c'
54--- examples/fingerpaint.c 2017-01-18 13:59:18 +0000
55+++ examples/fingerpaint.c 2017-01-19 08:14:45 +0000
56@@ -456,7 +456,7 @@
57 mir_window_spec_set_name(spec, "Mir Fingerpaint");
58 mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_software);
59
60- window = mir_create_window_sync(spec);
61+ window = mir_create_window(spec);
62 mir_window_spec_release(spec);
63
64 if (window != NULL)
65
66=== modified file 'examples/flicker.c'
67--- examples/flicker.c 2017-01-18 02:29:37 +0000
68+++ examples/flicker.c 2017-01-19 08:14:45 +0000
69@@ -159,7 +159,7 @@
70 mir_window_spec_set_name(spec, __FILE__);
71 mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_software);
72
73- window = mir_create_window_sync(spec);
74+ window = mir_create_window(spec);
75 mir_window_spec_release(spec);
76
77 assert(window != NULL);
78
79=== modified file 'examples/multiwin.c'
80--- examples/multiwin.c 2017-01-18 02:29:37 +0000
81+++ examples/multiwin.c 2017-01-19 08:14:45 +0000
82@@ -255,7 +255,7 @@
83 mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_software);
84 mir_window_spec_set_name(spec, "red");
85
86- win[0].window = mir_create_window_sync(spec);
87+ win[0].window = mir_create_window(spec);
88 win[0].fill.r = 0xff;
89 win[0].fill.g = 0x00;
90 win[0].fill.b = 0x00;
91@@ -265,7 +265,7 @@
92 mir_window_spec_set_name(spec, "green");
93 mir_window_spec_set_width(spec, 300);
94 mir_window_spec_set_height(spec, 150);
95- win[1].window = mir_create_window_sync(spec);
96+ win[1].window = mir_create_window(spec);
97 win[1].fill.r = 0x00;
98 win[1].fill.g = 0xff;
99 win[1].fill.b = 0x00;
100@@ -275,7 +275,7 @@
101 mir_window_spec_set_name(spec, "blue");
102 mir_window_spec_set_width(spec, 150);
103 mir_window_spec_set_height(spec, 300);
104- win[2].window = mir_create_window_sync(spec);
105+ win[2].window = mir_create_window(spec);
106 win[2].fill.r = 0x00;
107 win[2].fill.g = 0x00;
108 win[2].fill.b = 0xff;
109
110=== modified file 'examples/progressbar.c'
111--- examples/progressbar.c 2017-01-18 02:29:37 +0000
112+++ examples/progressbar.c 2017-01-19 08:14:45 +0000
113@@ -267,7 +267,7 @@
114
115 mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_software);
116
117- window = mir_create_window_sync(spec);
118+ window = mir_create_window(spec);
119 mir_window_spec_release(spec);
120
121 if (window != NULL)
122
123=== modified file 'examples/release_at_exit.c'
124--- examples/release_at_exit.c 2017-01-18 02:29:37 +0000
125+++ examples/release_at_exit.c 2017-01-19 08:14:45 +0000
126@@ -55,7 +55,7 @@
127 MirWindowSpec *spec = mir_create_normal_window_spec(connection, 640, 480);
128 mir_window_spec_set_pixel_format(spec, pixel_format);
129
130- window = mir_create_window_sync(spec);
131+ window = mir_create_window(spec);
132 mir_window_spec_release(spec);
133
134 mir_window_release_sync(window);
135
136=== modified file 'examples/tooltip.c'
137--- examples/tooltip.c 2017-01-18 02:29:37 +0000
138+++ examples/tooltip.c 2017-01-19 08:14:45 +0000
139@@ -113,7 +113,7 @@
140 mir_window_spec_set_min_height(spec, height);
141 mir_window_spec_set_max_height(spec, height);
142
143- MirWindow* tooltip = mir_create_window_sync(spec);
144+ MirWindow* tooltip = mir_create_window(spec);
145 mir_window_spec_release(spec);
146
147 MirBufferStream* const bs = mir_window_get_buffer_stream(tooltip);
148
149=== modified file 'include/client/mir_toolkit/mir_screencast.h'
150--- include/client/mir_toolkit/mir_screencast.h 2017-01-18 02:29:37 +0000
151+++ include/client/mir_toolkit/mir_screencast.h 2017-01-19 08:14:45 +0000
152@@ -35,7 +35,7 @@
153 *
154 * \param [in] connection a valid mir connection
155 * \return A handle that can ultimately be passed to
156- * mir_create_window() or mir_window_apply_spec()
157+ * mir_create_window_async() or mir_window_apply_spec()
158 */
159 MirScreencastSpec* mir_create_screencast_spec(MirConnection* connection);
160
161
162=== modified file 'include/client/mir_toolkit/mir_surface.h'
163--- include/client/mir_toolkit/mir_surface.h 2017-01-18 04:43:15 +0000
164+++ include/client/mir_toolkit/mir_surface.h 2017-01-19 08:14:45 +0000
165@@ -43,7 +43,7 @@
166 * \param [in] width Requested width. The server is not guaranteed to return a window of this width.
167 * \param [in] height Requested height. The server is not guaranteed to return a window of this height.
168 *
169- * \return A handle that can be passed to mir_create_window() to complete construction.
170+ * \return A handle that can be passed to mir_create_window_async() to complete construction.
171 */
172 MirWindowSpec* mir_create_normal_window_spec(MirConnection* connection,
173 int width, int height);
174@@ -69,7 +69,7 @@
175 * location.
176 * \param [in] edge The preferred edge direction to attach to. Use
177 * mir_edge_attachment_any for no preference.
178- * \return A handle that can be passed to mir_create_window()
179+ * \return A handle that can be passed to mir_create_window_async()
180 * to complete construction.
181 */
182 MirWindowSpec*
183@@ -100,7 +100,7 @@
184 * location.
185 * \param [in] edge The preferred edge direction to attach to. Use
186 * mir_edge_attachment_any for no preference.
187- * \return A handle that can be passed to mir_create_window()
188+ * \return A handle that can be passed to mir_create_window_async()
189 * to complete construction.
190 */
191 MirWindowSpec*
192@@ -163,7 +163,7 @@
193 * \param [in] connection Connection the window will be created on
194 * \param [in] width Requested width. The server is not guaranteed to return a window of this width.
195 * \param [in] height Requested height. The server is not guaranteed to return a window of this height.
196- * \return A handle that can be passed to mir_create_window() to complete construction.
197+ * \return A handle that can be passed to mir_create_window_async() to complete construction.
198 */
199 MirWindowSpec*
200 mir_create_input_method_window_spec(MirConnection* connection,
201@@ -171,15 +171,15 @@
202
203 /**
204 * Create a window specification.
205- * This can be used with mir_create_window() to create a window or with
206+ * This can be used with mir_create_window_async() to create a window or with
207 * mir_window_apply_spec() to change an existing window.
208- * \remark For use with mir_create_window() at least the type, width, height,
209+ * \remark For use with mir_create_window_async() at least the type, width, height,
210 * format and buffer_usage must be set. (And for types requiring a parent that
211 * too must be set.)
212 *
213 * \param [in] connection a valid mir connection
214 * \return A handle that can ultimately be passed to
215- * mir_create_window() or mir_window_apply_spec()
216+ * mir_create_window_async() or mir_window_apply_spec()
217 */
218 MirWindowSpec* mir_create_window_spec(MirConnection* connection);
219
220@@ -193,7 +193,7 @@
221
222 /**
223 * Update a window specification with a window type.
224- * This can be used with mir_create_window() to create a window or with
225+ * This can be used with mir_create_window_async() to create a window or with
226 * mir_window_apply_spec() to change an existing window.
227 * \remark For use with mir_window_apply_spec() the shell need not support
228 * arbitrary changes of type and some target types may require the setting of
229@@ -345,7 +345,7 @@
230 * \param [in] spec Specification to mutate
231 * \param [in] output_id ID of output to place window on. From MirDisplayOutput.output_id
232 *
233- * \note If this call returns %true then a valid window returned from mir_create_window() is
234+ * \note If this call returns %true then a valid window returned from mir_create_window_async() is
235 * guaranteed to be fullscreen on the specified output. An invalid window is returned
236 * if the server unable to, or policy prevents it from, honouring this request.
237 */
238@@ -357,7 +357,7 @@
239 * \param [in] mode Requested preferred orientation
240 *
241 * \note If the server is unable to create a window with the preferred orientation at
242- * the point mir_create_window() is called it will instead return an invalid window.
243+ * the point mir_create_window_async() is called it will instead return an invalid window.
244 */
245 void mir_window_spec_set_preferred_orientation(MirWindowSpec* spec, MirOrientationMode mode);
246
247@@ -375,9 +375,9 @@
248 * mir_edge_attachment_any for no preference.
249 * \return False if the operation is invalid for this window type.
250 *
251- * \note If the parent window becomes invalid before mir_create_window() is processed,
252+ * \note If the parent window becomes invalid before mir_create_window_async() is processed,
253 * it will return an invalid window. If the parent window is valid at the time
254- * mir_create_window() is called but is later closed, this window will also receive
255+ * mir_create_window_async() is called but is later closed, this window will also receive
256 * a close event.
257 */
258 bool mir_window_spec_attach_to_foreign_parent(MirWindowSpec* spec,
259@@ -391,7 +391,7 @@
260 * \param [in] state Requested state
261 *
262 * \note If the server is unable to create a window with the requested state at
263- * the point mir_create_window() is called it will instead return an invalid window.
264+ * the point mir_create_window_async() is called it will instead return an invalid window.
265 */
266 void mir_window_spec_set_state(MirWindowSpec* spec, MirWindowState state);
267
268@@ -492,7 +492,7 @@
269 *
270 * \note If this call returns %true then the server is guaranteed to honour this request.
271 * If the server is unable to create a window with this pixel format at
272- * the point mir_create_window() is called it will instead return an invalid window.
273+ * the point mir_create_window_async() is called it will instead return an invalid window.
274 */
275 void mir_window_spec_set_pixel_format(MirWindowSpec* spec, MirPixelFormat format);
276
277@@ -505,7 +505,7 @@
278 *
279 * \note If this call returns %true then the server is guaranteed to honour this request.
280 * If the server is unable to create a window with this buffer usage at
281- * the point mir_create_window() is called it will instead return an invalid window.
282+ * the point mir_create_window_async() is called it will instead return an invalid window.
283 */
284 void mir_window_spec_set_buffer_usage(MirWindowSpec* spec, MirBufferUsage usage);
285
286@@ -560,7 +560,7 @@
287 * non-null MirWindow*, but the window may be invalid in
288 * case of an error.
289 */
290-void mir_create_window(MirWindowSpec* requested_specification,
291+void mir_create_window_async(MirWindowSpec* requested_specification,
292 MirWindowCallback callback, void* context);
293
294 /**
295@@ -569,7 +569,7 @@
296 * \return The new window. This is guaranteed non-null, but may be invalid
297 * in the case of error.
298 */
299-MirWindow* mir_create_window_sync(MirWindowSpec* requested_specification);
300+MirWindow* mir_create_window(MirWindowSpec* requested_specification);
301
302 /**
303 * Release the supplied window and any associated buffer.
304@@ -937,11 +937,11 @@
305
306 MirWaitHandle* mir_surface_create(MirSurfaceSpec* requested_specification,
307 mir_surface_callback callback, void* context)
308+__attribute__((deprecated("use mir_create_window_async() instead")));
309+
310+MirSurface* mir_surface_create_sync(MirSurfaceSpec* requested_specification)
311 __attribute__((deprecated("use mir_create_window() instead")));
312
313-MirSurface* mir_surface_create_sync(MirSurfaceSpec* requested_specification)
314-__attribute__((deprecated("use mir_create_window_sync() instead")));
315-
316 MirWaitHandle *mir_surface_release(
317 MirSurface *surface,
318 mir_surface_callback callback,
319
320=== modified file 'playground/egldiamond_render_surface.c'
321--- playground/egldiamond_render_surface.c 2017-01-18 02:29:37 +0000
322+++ playground/egldiamond_render_surface.c 2017-01-19 08:14:45 +0000
323@@ -237,7 +237,7 @@
324
325 mir_window_spec_set_event_handler(spec, resize_callback, render_surface);
326
327- window = mir_create_window_sync(spec);
328+ window = mir_create_window(spec);
329 mir_window_spec_release(spec);
330
331 CHECK(eglsurface != EGL_NO_SURFACE, "eglCreateWindowSurface failed");
332
333=== modified file 'playground/mir_demo_client_chain_jumping_buffers.c'
334--- playground/mir_demo_client_chain_jumping_buffers.c 2017-01-18 02:29:37 +0000
335+++ playground/mir_demo_client_chain_jumping_buffers.c 2017-01-19 08:14:45 +0000
336@@ -211,7 +211,7 @@
337 spec, render_surface[2], chain_width, chain_height, displacement_x, chain_height);
338 mir_surface_spec_add_render_surface(
339 spec, render_surface[3], chain_width, chain_height, chain_width, chain_height);
340- MirWindow* window = mir_create_window_sync(spec);
341+ MirWindow* window = mir_create_window(spec);
342 mir_window_spec_release(spec);
343
344 MirBufferUsage usage = mir_buffer_usage_software;
345
346=== modified file 'playground/mir_demo_client_prerendered_frames.c'
347--- playground/mir_demo_client_prerendered_frames.c 2017-01-18 02:29:37 +0000
348+++ playground/mir_demo_client_prerendered_frames.c 2017-01-19 08:14:45 +0000
349@@ -172,7 +172,7 @@
350 mir_window_spec_set_pixel_format(spec, format);
351 mir_surface_spec_add_render_surface(
352 spec, render_surface, width, height, displacement_x, displacement_y);
353- MirWindow* window = mir_create_window_sync(spec);
354+ MirWindow* window = mir_create_window(spec);
355 if (!mir_window_is_valid(window))
356 {
357 printf("could not create a window\n");
358
359=== modified file 'playground/render_surface.cpp'
360--- playground/render_surface.cpp 2017-01-18 02:29:37 +0000
361+++ playground/render_surface.cpp 2017-01-19 08:14:45 +0000
362@@ -210,7 +210,7 @@
363 pixel_format,
364 mir_buffer_usage_software);
365
366- auto window = mir_create_window_sync(spec);
367+ auto window = mir_create_window(spec);
368 mir_window_spec_release(spec);
369
370 fill_stream_with(buffer_stream, 255, 0, 0, 128);
371
372=== modified file 'src/client/mir_surface_api.cpp'
373--- src/client/mir_surface_api.cpp 2017-01-18 04:43:15 +0000
374+++ src/client/mir_surface_api.cpp 2017-01-19 08:14:45 +0000
375@@ -556,16 +556,16 @@
376 }
377 }
378
379-void mir_create_window(MirWindowSpec* requested_specification,
380- MirWindowCallback callback, void* context)
381+void mir_create_window_async(MirWindowSpec* requested_specification,
382+ MirWindowCallback callback, void* context)
383 {
384 window_create_helper(requested_specification, callback, context);
385 }
386
387-MirWindow* mir_create_window_sync(MirWindowSpec* requested_specification)
388+MirWindow* mir_create_window(MirWindowSpec* requested_specification)
389 {
390 WindowSync ws;
391- mir_create_window(requested_specification,
392+ mir_create_window_async(requested_specification,
393 reinterpret_cast<MirWindowCallback>(set_result),
394 &ws);
395 return ws.wait_for_result();
396@@ -908,7 +908,7 @@
397
398 MirSurface* mir_surface_create_sync(MirSurfaceSpec* requested_specification)
399 {
400- return mir_create_window_sync(requested_specification);
401+ return mir_create_window(requested_specification);
402 }
403
404 MirWaitHandle* mir_surface_create(MirSurfaceSpec* requested_specification,
405
406=== modified file 'src/client/symbols.map'
407--- src/client/symbols.map 2017-01-18 16:25:59 +0000
408+++ src/client/symbols.map 2017-01-19 08:14:45 +0000
409@@ -540,8 +540,8 @@
410 mir_window_spec_set_buffer_usage;
411 mir_window_spec_set_streams;
412 mir_window_apply_spec;
413+ mir_create_window_async;
414 mir_create_window;
415- mir_create_window_sync;
416 mir_window_release;
417 mir_window_release_sync;
418 mir_window_is_valid;
419
420=== modified file 'src/platforms/android/utils/test_android_hardware_sanity.cpp'
421--- src/platforms/android/utils/test_android_hardware_sanity.cpp 2017-01-18 02:29:37 +0000
422+++ src/platforms/android/utils/test_android_hardware_sanity.cpp 2017-01-19 08:14:45 +0000
423@@ -119,7 +119,7 @@
424 connection, test_width, test_height);
425 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
426 mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_software);
427- auto const window = mir_create_window_sync(spec);
428+ auto const window = mir_create_window(spec);
429 mir_window_spec_release(spec);
430
431 EXPECT_THAT(window, IsValid());
432@@ -175,7 +175,7 @@
433 auto const spec = mir_create_normal_window_spec(connection, test_width, test_height);
434 mir_window_spec_set_pixel_format(spec, select_format_for_visual_id(visual_id));
435
436- auto const mir_surface = mir_create_window_sync(spec);
437+ auto const mir_surface = mir_create_window(spec);
438 mir_window_spec_release(spec);
439
440 EXPECT_THAT(mir_surface, IsValid());
441
442=== modified file 'src/server/graphics/nested/mir_client_host_connection.cpp'
443--- src/server/graphics/nested/mir_client_host_connection.cpp 2017-01-18 19:57:47 +0000
444+++ src/server/graphics/nested/mir_client_host_connection.cpp 2017-01-19 08:14:45 +0000
445@@ -108,7 +108,7 @@
446 MirWindowSpec* spec)
447 : mir_connection(mir_connection),
448 mir_surface{
449- mir_create_window_sync(spec)}
450+ mir_create_window(spec)}
451 {
452 if (!mir_window_is_valid(mir_surface))
453 {
454
455=== modified file 'tests/acceptance-tests/test_buffer_stream_arrangement.cpp'
456--- tests/acceptance-tests/test_buffer_stream_arrangement.cpp 2017-01-18 02:29:37 +0000
457+++ tests/acceptance-tests/test_buffer_stream_arrangement.cpp 2017-01-19 08:14:45 +0000
458@@ -209,7 +209,7 @@
459 mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
460 mir_window_spec_set_streams(spec, infos.data(), infos.size());
461
462- window = mir_create_window_sync(spec);
463+ window = mir_create_window(spec);
464 mir_window_spec_release(spec);
465 EXPECT_TRUE(mir_window_is_valid(window)) << mir_window_get_error_message(window);
466 }
467@@ -263,7 +263,7 @@
468 auto spec = mir_create_normal_window_spec(connection, 100, 100);
469 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
470 mir_window_spec_set_streams(spec, infos.data(), infos.size());
471- auto window = mir_create_window_sync(spec);
472+ auto window = mir_create_window(spec);
473 mir_window_spec_release(spec);
474 EXPECT_TRUE(mir_window_is_valid(window));
475 EXPECT_THAT(mir_window_get_error_message(window), StrEq(""));
476
477=== modified file 'tests/acceptance-tests/test_client_cookie.cpp'
478--- tests/acceptance-tests/test_client_cookie.cpp 2017-01-18 02:29:37 +0000
479+++ tests/acceptance-tests/test_client_cookie.cpp 2017-01-19 08:14:45 +0000
480@@ -62,7 +62,7 @@
481 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
482 mir_window_spec_set_fullscreen_on_output(spec, 1);
483 mir_window_spec_set_event_handler(spec, &cookie_capturing_callback, this);
484- window = mir_create_window_sync(spec);
485+ window = mir_create_window(spec);
486 mir_window_spec_release(spec);
487
488 mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window));
489
490=== modified file 'tests/acceptance-tests/test_client_cursor_api.cpp'
491--- tests/acceptance-tests/test_client_cursor_api.cpp 2017-01-18 02:29:37 +0000
492+++ tests/acceptance-tests/test_client_cursor_api.cpp 2017-01-19 08:14:45 +0000
493@@ -137,7 +137,7 @@
494 auto spec = mir_create_normal_window_spec(connection, 1, 1);
495 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
496 mir_window_spec_set_name(spec, client_name.c_str());
497- auto const window = mir_create_window_sync(spec);
498+ auto const window = mir_create_window(spec);
499 mir_window_spec_release(spec);
500
501 mir_buffer_stream_swap_buffers_sync(
502
503=== modified file 'tests/acceptance-tests/test_client_focus_notification.cpp'
504--- tests/acceptance-tests/test_client_focus_notification.cpp 2017-01-18 02:29:37 +0000
505+++ tests/acceptance-tests/test_client_focus_notification.cpp 2017-01-19 08:14:45 +0000
506@@ -44,7 +44,7 @@
507 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
508 mir_window_spec_set_event_handler(spec, FocusSurface::handle_event, this);
509
510- window = mir_create_window_sync(spec);
511+ window = mir_create_window(spec);
512 mir_window_spec_release(spec);
513
514 mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window));
515
516=== modified file 'tests/acceptance-tests/test_client_input.cpp'
517--- tests/acceptance-tests/test_client_input.cpp 2017-01-18 16:25:59 +0000
518+++ tests/acceptance-tests/test_client_input.cpp 2017-01-19 08:14:45 +0000
519@@ -97,7 +97,7 @@
520 auto spec = mir_create_normal_window_spec(connection, surface_width, surface_height);
521 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
522 mir_window_spec_set_name(spec, name.c_str());
523- window = mir_create_window_sync(spec);
524+ window = mir_create_window(spec);
525 mir_window_spec_release(spec);
526 if (!mir_window_is_valid(window))
527 BOOST_THROW_EXCEPTION(std::runtime_error{std::string{"Failed creating a window: "}+
528
529=== modified file 'tests/acceptance-tests/test_client_library.cpp'
530--- tests/acceptance-tests/test_client_library.cpp 2017-01-18 19:57:47 +0000
531+++ tests/acceptance-tests/test_client_library.cpp 2017-01-19 08:14:45 +0000
532@@ -349,7 +349,7 @@
533 auto spec = mir_create_normal_window_spec(connection, request_width, request_height);
534 mir_window_spec_set_pixel_format(spec, request_format);
535 mir_window_spec_set_buffer_usage(spec, request_buffer_usage);
536- window = mir_create_window_sync(spec);
537+ window = mir_create_window(spec);
538 mir_window_spec_release(spec);
539
540 ASSERT_THAT(window, NotNull());
541@@ -372,7 +372,7 @@
542 connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
543 auto const spec = mir_create_normal_window_spec(connection, 123, 456);
544 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
545- window = mir_create_window_sync(spec);
546+ window = mir_create_window(spec);
547 mir_window_spec_release(spec);
548
549 EXPECT_THAT(window, IsValid());
550@@ -389,7 +389,7 @@
551 mir_create_normal_window_spec(connection, 640, 480);
552 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
553
554- window = mir_create_window_sync(spec);
555+ window = mir_create_window(spec);
556
557 mir_window_spec_release(spec);
558
559@@ -429,7 +429,7 @@
560 auto const spec = mir_create_normal_window_spec(connection, width, height);
561 mir_window_spec_set_pixel_format(spec, format);
562 mir_window_spec_set_pointer_confinement(spec, mir_pointer_confined_to_window);
563- window = mir_create_window_sync(spec);
564+ window = mir_create_window(spec);
565 mir_window_spec_release(spec);
566
567 EXPECT_THAT(window, IsValid());
568@@ -450,7 +450,7 @@
569
570 int const min_width = 480;
571 mir_window_spec_set_min_width(spec, min_width);
572- window = mir_create_window_sync(spec);
573+ window = mir_create_window(spec);
574 mir_window_spec_release(spec);
575
576 EXPECT_THAT(window, IsValid());
577@@ -471,7 +471,7 @@
578
579 int const min_height = 480;
580 mir_window_spec_set_min_height(spec, min_height);
581- window = mir_create_window_sync(spec);
582+ window = mir_create_window(spec);
583 mir_window_spec_release(spec);
584
585 EXPECT_THAT(window, IsValid());
586@@ -492,7 +492,7 @@
587
588 int const max_width = 1024;
589 mir_window_spec_set_max_width(spec, max_width);
590- window = mir_create_window_sync(spec);
591+ window = mir_create_window(spec);
592 mir_window_spec_release(spec);
593
594 EXPECT_THAT(window, IsValid());
595@@ -513,7 +513,7 @@
596
597 int const max_height = 1024;
598 mir_window_spec_set_max_height(spec, max_height);
599- window = mir_create_window_sync(spec);
600+ window = mir_create_window(spec);
601 mir_window_spec_release(spec);
602
603 EXPECT_THAT(window, IsValid());
604@@ -537,7 +537,7 @@
605
606 mir_window_spec_set_min_width(spec, min_width);
607 mir_window_spec_set_min_height(spec, min_height);
608- window = mir_create_window_sync(spec);
609+ window = mir_create_window(spec);
610 mir_window_spec_release(spec);
611
612 auto const buffer_stream = mir_window_get_buffer_stream(window);
613@@ -558,7 +558,7 @@
614 auto const spec = mir_create_normal_window_spec(connection, 640, 480);
615 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
616
617- window = mir_create_window_sync(spec);
618+ window = mir_create_window(spec);
619 mir_window_spec_release(spec);
620
621 // Expect zero (not wired up to detect the physical display yet)
622@@ -576,7 +576,7 @@
623 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
624 mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
625
626- window = mir_create_window_sync(spec);
627+ window = mir_create_window(spec);
628
629 MirNativeBuffer *native;
630 auto bs = mir_window_get_buffer_stream(window);
631@@ -589,7 +589,7 @@
632 mir_window_spec_set_width(spec, 100);
633 mir_window_spec_set_height(spec, 100);
634
635- window = mir_create_window_sync(spec);
636+ window = mir_create_window(spec);
637 bs = mir_window_get_buffer_stream(window);
638 mir_buffer_stream_get_current_buffer(bs, &native);
639 EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout);
640@@ -602,7 +602,7 @@
641 mir_window_spec_set_height(spec, 600);
642 mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_software);
643
644- window = mir_create_window_sync(spec);
645+ window = mir_create_window(spec);
646 bs = mir_window_get_buffer_stream(window);
647 mir_buffer_stream_get_current_buffer(bs, &native);
648 EXPECT_FALSE(native->flags & mir_buffer_flag_can_scanout);
649@@ -612,7 +612,7 @@
650
651 mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
652
653- window = mir_create_window_sync(spec);
654+ window = mir_create_window(spec);
655 bs = mir_window_get_buffer_stream(window);
656 mir_buffer_stream_get_current_buffer(bs, &native);
657 EXPECT_TRUE(native->flags & mir_buffer_flag_can_scanout);
658@@ -645,7 +645,7 @@
659 mir_window_spec_set_width(spec, size.width);
660 mir_window_spec_set_height(spec, size.height);
661
662- window = mir_create_window_sync(spec);
663+ window = mir_create_window(spec);
664 auto bs = mir_window_get_buffer_stream(window);
665
666 MirNativeBuffer *native = NULL;
667@@ -683,7 +683,7 @@
668 {
669 old_surface_count = current_surface_count();
670
671- mir_create_window(spec, create_surface_callback, this);
672+ mir_create_window_async(spec, create_surface_callback, this);
673 wait_for_window_create();
674
675 ASSERT_THAT(current_surface_count(), Eq(old_surface_count + 1));
676@@ -867,7 +867,7 @@
677 auto surface_spec = mir_create_normal_window_spec(connection, width, height);
678 mir_window_spec_set_pixel_format(surface_spec, format);
679
680- auto window = mir_create_window_sync(surface_spec);
681+ auto window = mir_create_window(surface_spec);
682 mir_window_spec_release(surface_spec);
683
684 EXPECT_THAT(window, IsValid());
685@@ -893,7 +893,7 @@
686 auto surface_spec = mir_create_normal_window_spec(connection, width, height);
687 mir_window_spec_set_pixel_format(surface_spec, format);
688
689- window = mir_create_window_sync(surface_spec);
690+ window = mir_create_window(surface_spec);
691 mir_window_spec_release(surface_spec);
692
693 EXPECT_THAT(window, IsValid());
694@@ -932,7 +932,7 @@
695 MirBufferUsage const buffer_usage{mir_buffer_usage_hardware};
696 mir_window_spec_set_buffer_usage(surface_spec, buffer_usage);
697
698- auto window = mir_create_window_sync(surface_spec);
699+ auto window = mir_create_window(surface_spec);
700 mir_window_spec_release(surface_spec);
701
702 EXPECT_THAT(window, IsValid());
703@@ -959,7 +959,7 @@
704 auto id = mir_output_get_id(output);
705 mir_window_spec_set_fullscreen_on_output(surface_spec, id);
706
707- auto window = mir_create_window_sync(surface_spec);
708+ auto window = mir_create_window(surface_spec);
709 mir_window_spec_release(surface_spec);
710
711 EXPECT_THAT(window, IsValid());
712@@ -1000,7 +1000,7 @@
713 MirBufferUsage const buffer_usage{mir_buffer_usage_hardware};
714 mir_window_spec_set_buffer_usage(surface_spec, buffer_usage);
715
716- auto window = mir_create_window_sync(surface_spec);
717+ auto window = mir_create_window(surface_spec);
718 mir_window_spec_release(surface_spec);
719
720 EXPECT_THAT(window, IsValid());
721@@ -1028,7 +1028,7 @@
722 MirBufferUsage const buffer_usage{mir_buffer_usage_software};
723 mir_window_spec_set_buffer_usage(surface_spec, buffer_usage);
724
725- auto window = mir_create_window_sync(surface_spec);
726+ auto window = mir_create_window(surface_spec);
727 mir_window_spec_release(surface_spec);
728
729 EXPECT_THAT(window, IsValid());
730@@ -1067,7 +1067,7 @@
731
732 auto surface_spec = mir_create_normal_window_spec(connection, 800, 600);
733 mir_window_spec_set_pixel_format(surface_spec, mir_pixel_format_argb_8888);
734- auto window = mir_create_window_sync(surface_spec);
735+ auto window = mir_create_window(surface_spec);
736 mir_window_spec_release(surface_spec);
737
738 ASSERT_THAT(window, IsValid());
739@@ -1090,7 +1090,7 @@
740
741 auto surface_spec = mir_create_normal_window_spec(connection, 800, 600);
742 mir_window_spec_set_pixel_format(surface_spec, mir_pixel_format_argb_8888);
743- auto window = mir_create_window_sync(surface_spec);
744+ auto window = mir_create_window(surface_spec);
745 mir_window_spec_release(surface_spec);
746
747 ASSERT_THAT(window, IsValid());
748@@ -1109,7 +1109,7 @@
749
750 auto surface_spec = mir_create_normal_window_spec(first_client, 800, 600);
751 mir_window_spec_set_pixel_format(surface_spec, mir_pixel_format_argb_8888);
752- auto main_surface = mir_create_window_sync(surface_spec);
753+ auto main_surface = mir_create_window(surface_spec);
754 mir_window_spec_release(surface_spec);
755
756 ASSERT_THAT(main_surface, IsValid());
757@@ -1133,7 +1133,7 @@
758 im_parent_id,
759 &attachment_rect,
760 mir_edge_attachment_any);
761- auto im_surface = mir_create_window_sync(surface_spec);
762+ auto im_surface = mir_create_window(surface_spec);
763
764 EXPECT_THAT(im_surface, IsValid());
765
766
767=== modified file 'tests/acceptance-tests/test_client_library_errors.cpp'
768--- tests/acceptance-tests/test_client_library_errors.cpp 2017-01-18 02:29:37 +0000
769+++ tests/acceptance-tests/test_client_library_errors.cpp 2017-01-19 08:14:45 +0000
770@@ -92,7 +92,7 @@
771
772 auto spec = mir_create_normal_window_spec(connection, 800, 600);
773 mir_window_spec_set_pixel_format(spec, mir_pixel_format_xbgr_8888);
774- auto window = mir_create_window_sync(spec);
775+ auto window = mir_create_window(spec);
776 mir_window_spec_release(spec);
777
778 ASSERT_NE(window, nullptr);
779@@ -139,7 +139,7 @@
780
781 auto spec = mir_create_normal_window_spec(connection, 800, 600);
782 mir_window_spec_set_pixel_format(spec, mir_pixel_format_xbgr_8888);
783- auto window = mir_create_window_sync(spec);
784+ auto window = mir_create_window(spec);
785 mir_window_spec_release(spec);
786
787 mir_window_release_sync(window);
788@@ -168,7 +168,7 @@
789
790 auto spec = mir_create_normal_window_spec(connection, 800, 600);
791 mir_window_spec_set_pixel_format(spec, mir_pixel_format_xbgr_8888);
792- auto window = mir_create_window_sync(spec);
793+ auto window = mir_create_window(spec);
794 mir_window_spec_release(spec);
795
796 ASSERT_NE(window, nullptr);
797@@ -195,7 +195,7 @@
798
799 auto spec = mir_create_normal_window_spec(connection, 800, 600);
800 mir_window_spec_set_pixel_format(spec, mir_pixel_format_xbgr_8888);
801- auto window = mir_create_window_sync(spec);
802+ auto window = mir_create_window(spec);
803 mir_window_spec_release(spec);
804
805 ASSERT_NE(window, nullptr);
806@@ -227,7 +227,7 @@
807 };
808 mir_window_spec_attach_to_foreign_parent(spec, invalid_id, &rect, mir_edge_attachment_any);
809
810- auto window = mir_create_window_sync(spec);
811+ auto window = mir_create_window(spec);
812 EXPECT_THAT(window, Not(IsValid()));
813 EXPECT_THAT(mir_window_get_error_message(window), MatchesRegex(".*Lookup.*failed.*"));
814
815
816=== modified file 'tests/acceptance-tests/test_client_logging.cpp'
817--- tests/acceptance-tests/test_client_logging.cpp 2017-01-18 02:29:37 +0000
818+++ tests/acceptance-tests/test_client_logging.cpp 2017-01-19 08:14:45 +0000
819@@ -62,7 +62,7 @@
820 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
821 mir_window_spec_set_name(spec, "Rumpelstiltskin");
822 mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_software);
823- auto window = mir_create_window_sync(spec);
824+ auto window = mir_create_window(spec);
825 ASSERT_THAT(window, NotNull());
826 mir_window_spec_release(spec);
827
828
829=== modified file 'tests/acceptance-tests/test_client_surface_events.cpp'
830--- tests/acceptance-tests/test_client_surface_events.cpp 2017-01-18 02:29:37 +0000
831+++ tests/acceptance-tests/test_client_surface_events.cpp 2017-01-19 08:14:45 +0000
832@@ -531,7 +531,7 @@
833 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
834 mir_window_spec_set_event_handler(spec, &raise_signal_on_close_event, &done);
835
836- auto window = mir_create_window_sync(spec);
837+ auto window = mir_create_window(spec);
838
839 mir_window_spec_release(spec);
840
841@@ -622,7 +622,7 @@
842 auto spec = mir_create_normal_window_spec(connection, 640, 480);
843 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
844 mir_window_spec_set_event_handler(spec, &surface_output_capturing_callback, &context);
845- auto window = mir_create_window_sync(spec);
846+ auto window = mir_create_window(spec);
847 mir_window_spec_release(spec);
848
849 ASSERT_TRUE(context.captured.wait_for(10s));
850
851=== modified file 'tests/acceptance-tests/test_client_surface_visibility.cpp'
852--- tests/acceptance-tests/test_client_surface_visibility.cpp 2017-01-18 02:29:37 +0000
853+++ tests/acceptance-tests/test_client_surface_visibility.cpp 2017-01-19 08:14:45 +0000
854@@ -113,7 +113,7 @@
855 mir_window_spec_set_name(spec, name);
856 mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
857 mir_window_spec_set_event_handler(spec, &event_callback, &mock_callback);
858- auto window = mir_create_window_sync(spec);
859+ auto window = mir_create_window(spec);
860 mir_window_spec_release(spec);
861 return window;
862 }
863
864=== modified file 'tests/acceptance-tests/test_client_surfaces.cpp'
865--- tests/acceptance-tests/test_client_surfaces.cpp 2017-01-18 02:29:37 +0000
866+++ tests/acceptance-tests/test_client_surfaces.cpp 2017-01-19 08:14:45 +0000
867@@ -68,12 +68,12 @@
868
869 auto spec = mir_create_normal_window_spec(connection, width_1, height_1);
870 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
871- window[0] = mir_create_window_sync(spec);
872+ window[0] = mir_create_window(spec);
873
874 mir_window_spec_set_width(spec, width_2);
875 mir_window_spec_set_height(spec, height_2);
876
877- window[1] = mir_create_window_sync(spec);
878+ window[1] = mir_create_window(spec);
879
880 mir_window_spec_release(spec);
881
882@@ -112,7 +112,7 @@
883 {
884 auto spec = mir_create_normal_window_spec(connection, 1, 1);
885 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
886- window[i] = mir_create_window_sync(spec);
887+ window[i] = mir_create_window(spec);
888 mir_window_spec_release(spec);
889 }
890
891@@ -146,7 +146,7 @@
892 MirOrientationMode mode{GetParam()};
893 mir_window_spec_set_preferred_orientation(spec, mode);
894
895- auto window = mir_create_window_sync(spec);
896+ auto window = mir_create_window(spec);
897 mir_window_spec_release(spec);
898
899 ASSERT_THAT(window, IsValid());
900@@ -172,7 +172,7 @@
901 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
902 ASSERT_THAT(spec, NotNull());
903
904- auto menu = mir_create_window_sync(spec);
905+ auto menu = mir_create_window(spec);
906 mir_window_spec_release(spec);
907
908 ASSERT_THAT(menu, IsValid());
909@@ -192,7 +192,7 @@
910 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
911 ASSERT_THAT(spec, NotNull());
912
913- auto tooltip = mir_create_window_sync(spec);
914+ auto tooltip = mir_create_window(spec);
915 mir_window_spec_release(spec);
916
917 ASSERT_THAT(tooltip, IsValid());
918@@ -208,7 +208,7 @@
919 ASSERT_THAT(spec, NotNull());
920 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
921
922- auto dialog = mir_create_window_sync(spec);
923+ auto dialog = mir_create_window(spec);
924 mir_window_spec_release(spec);
925
926 ASSERT_THAT(dialog, IsValid());
927@@ -224,7 +224,7 @@
928 ASSERT_THAT(spec, NotNull());
929 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
930
931- auto dialog = mir_create_window_sync(spec);
932+ auto dialog = mir_create_window(spec);
933 mir_window_spec_release(spec);
934
935 ASSERT_THAT(dialog, IsValid());
936@@ -240,7 +240,7 @@
937 ASSERT_THAT(spec, NotNull());
938 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
939
940- auto im = mir_create_window_sync(spec);
941+ auto im = mir_create_window(spec);
942 mir_window_spec_release(spec);
943
944 EXPECT_EQ(mir_window_get_type(im), mir_window_type_inputmethod);
945@@ -253,7 +253,7 @@
946 auto spec = mir_create_normal_window_spec(connection, 123, 456);
947 ASSERT_THAT(spec, NotNull());
948 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
949- auto window = mir_create_window_sync(spec);
950+ auto window = mir_create_window(spec);
951 mir_window_spec_release(spec);
952
953 /*
954@@ -324,7 +324,7 @@
955
956 mir_persistent_id_release(parent_id);
957
958- auto im = mir_create_window_sync(spec);
959+ auto im = mir_create_window(spec);
960 mir_window_spec_release(spec);
961
962 mir_window_release_sync(im);
963
964=== modified file 'tests/acceptance-tests/test_confined_pointer.cpp'
965--- tests/acceptance-tests/test_confined_pointer.cpp 2017-01-18 02:29:37 +0000
966+++ tests/acceptance-tests/test_confined_pointer.cpp 2017-01-19 08:14:45 +0000
967@@ -81,7 +81,7 @@
968 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
969 mir_window_spec_set_pointer_confinement(spec, mir_pointer_confined_to_window);
970 mir_window_spec_set_name(spec, name.c_str());
971- window = mir_create_window_sync(spec);
972+ window = mir_create_window(spec);
973 mir_window_spec_release(spec);
974 if (!mir_window_is_valid(window))
975 {
976
977=== modified file 'tests/acceptance-tests/test_custom_window_management.cpp'
978--- tests/acceptance-tests/test_custom_window_management.cpp 2017-01-18 04:43:15 +0000
979+++ tests/acceptance-tests/test_custom_window_management.cpp 2017-01-19 08:14:45 +0000
980@@ -78,7 +78,7 @@
981 {
982 auto spec = mir_create_normal_window_spec(connection, 800, 600);
983 mir_window_spec_set_pixel_format(spec, mir_pixel_format_bgr_888);
984- auto window = mir_create_window_sync(spec);
985+ auto window = mir_create_window(spec);
986 mir_window_spec_release(spec);
987
988 return window;
989@@ -316,7 +316,7 @@
990
991 EXPECT_CALL(window_manager, add_surface(_,_,_)).WillOnce(Invoke(check_add_surface));
992
993- auto window = mir_create_window_sync(surface_spec);
994+ auto window = mir_create_window(surface_spec);
995 mir_window_spec_release(surface_spec);
996
997 mir_window_release_sync(window);
998@@ -334,7 +334,7 @@
999 auto surface_spec = mir_create_normal_window_spec(connection, width, height);
1000 mir_window_spec_set_pixel_format(surface_spec, format);
1001
1002- auto window = mir_create_window_sync(surface_spec);
1003+ auto window = mir_create_window(surface_spec);
1004 mir_window_spec_release(surface_spec);
1005
1006 surface_spec = mir_create_window_spec(connection);
1007@@ -380,7 +380,7 @@
1008 auto connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
1009 auto surface_spec = mir_create_normal_window_spec(connection, width, height);
1010 mir_window_spec_set_pixel_format(surface_spec, format);
1011- auto parent = mir_create_window_sync(surface_spec);
1012+ auto parent = mir_create_window(surface_spec);
1013 mir_window_spec_release(surface_spec);
1014
1015 surface_spec = mir_create_tip_window_spec(
1016@@ -433,7 +433,7 @@
1017
1018 EXPECT_CALL(window_manager, add_surface(_,_,_)).WillOnce(Invoke(check_placement));
1019
1020- auto child = mir_create_window_sync(surface_spec);
1021+ auto child = mir_create_window(surface_spec);
1022 mir_window_spec_release(surface_spec);
1023
1024 EXPECT_TRUE(received.wait_for(400ms));
1025@@ -460,13 +460,13 @@
1026 auto connection = mir_connect_sync(new_connection().c_str(), __PRETTY_FUNCTION__);
1027 auto surface_spec = mir_create_normal_window_spec(connection, width, height);
1028 mir_window_spec_set_pixel_format(surface_spec, format);
1029- auto parent = mir_create_window_sync(surface_spec);
1030+ auto parent = mir_create_window(surface_spec);
1031 mir_window_spec_release(surface_spec);
1032
1033 surface_spec = mir_create_menu_window_spec(
1034 connection, width, height, parent, &dummy_rect, mir_edge_attachment_any);
1035 mir_window_spec_set_pixel_format(surface_spec, format);
1036- auto child = mir_create_window_sync(surface_spec);
1037+ auto child = mir_create_window(surface_spec);
1038 mir_window_spec_release(surface_spec);
1039
1040 surface_spec = mir_create_window_spec(connection);
1041@@ -590,7 +590,7 @@
1042 auto surface_spec = mir_create_normal_window_spec(connection, width, height);
1043 mir_window_spec_set_pixel_format(surface_spec, format);
1044 mir_window_spec_set_event_handler(surface_spec, &window_placement_event_callback, &placement_check);
1045- auto window = mir_create_window_sync(surface_spec);
1046+ auto window = mir_create_window(surface_spec);
1047 mir_window_spec_release(surface_spec);
1048
1049 scene_surface->placed_relative(placement_);
1050
1051=== modified file 'tests/acceptance-tests/test_display_configuration.cpp'
1052--- tests/acceptance-tests/test_display_configuration.cpp 2017-01-18 13:59:18 +0000
1053+++ tests/acceptance-tests/test_display_configuration.cpp 2017-01-19 08:14:45 +0000
1054@@ -208,7 +208,7 @@
1055
1056 auto const spec = mir_create_normal_window_spec(connection, 100, 100);
1057 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
1058- window = mir_create_window_sync(spec);
1059+ window = mir_create_window(spec);
1060 mir_window_spec_release(spec);
1061 mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window));
1062 }
1063
1064=== modified file 'tests/acceptance-tests/test_nested_mir.cpp'
1065--- tests/acceptance-tests/test_nested_mir.cpp 2017-01-19 04:35:37 +0000
1066+++ tests/acceptance-tests/test_nested_mir.cpp 2017-01-19 08:14:45 +0000
1067@@ -813,7 +813,7 @@
1068 },
1069 &surface_event_received);
1070
1071- auto window = mir_create_window_sync(spec);
1072+ auto window = mir_create_window(spec);
1073 mir_window_spec_release(spec);
1074
1075 EXPECT_TRUE(surface_event_received.wait_for(30s));
1076
1077=== modified file 'tests/acceptance-tests/test_new_display_configuration.cpp'
1078--- tests/acceptance-tests/test_new_display_configuration.cpp 2017-01-18 02:29:37 +0000
1079+++ tests/acceptance-tests/test_new_display_configuration.cpp 2017-01-19 08:14:45 +0000
1080@@ -268,7 +268,7 @@
1081 auto const spec = mir_create_normal_window_spec(connection, 100, 100);
1082 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
1083 mir_window_spec_set_event_handler(spec, &handle_event, this);
1084- window = mir_create_window_sync(spec);
1085+ window = mir_create_window(spec);
1086 mir_window_spec_release(spec);
1087 mir_buffer_stream_swap_buffers_sync(mir_window_get_buffer_stream(window));
1088
1089
1090=== modified file 'tests/acceptance-tests/test_presentation_chain.cpp'
1091--- tests/acceptance-tests/test_presentation_chain.cpp 2017-01-18 04:43:15 +0000
1092+++ tests/acceptance-tests/test_presentation_chain.cpp 2017-01-19 08:14:45 +0000
1093@@ -112,7 +112,7 @@
1094 mir_window_spec_set_pixel_format(spec, pf);
1095 mir_surface_spec_add_presentation_chain(
1096 spec, size.width.as_int(), size.height.as_int(), 0, 0, chain);
1097- auto window = mir_create_window_sync(spec);
1098+ auto window = mir_create_window(spec);
1099 mir_window_spec_release(spec);
1100 return window;
1101 }
1102@@ -134,7 +134,7 @@
1103 MirWindowSpec* spec = mir_create_normal_window_spec(
1104 connection, size.width.as_int(), size.height.as_int());
1105 mir_window_spec_set_pixel_format(spec, pf);
1106- auto window = mir_create_window_sync(spec);
1107+ auto window = mir_create_window(spec);
1108 mir_window_spec_release(spec);
1109 spec = mir_create_window_spec(connection);
1110 mir_surface_spec_add_presentation_chain(
1111@@ -381,7 +381,7 @@
1112 auto spec = mir_create_normal_window_spec(
1113 connection, size.width.as_int(), size.height.as_int());
1114 mir_window_spec_set_pixel_format(spec, pf);
1115- auto window = mir_create_window_sync(spec);
1116+ auto window = mir_create_window(spec);
1117 mir_window_spec_release(spec);
1118
1119 spec = mir_create_window_spec(connection);
1120
1121=== modified file 'tests/acceptance-tests/test_render_surface.cpp'
1122--- tests/acceptance-tests/test_render_surface.cpp 2017-01-18 02:29:37 +0000
1123+++ tests/acceptance-tests/test_render_surface.cpp 2017-01-19 08:14:45 +0000
1124@@ -148,7 +148,7 @@
1125 physical_size.width.as_int(), physical_size.height.as_int());
1126 mir_surface_spec_add_render_surface(
1127 spec, rs, logical_size.width.as_int(), logical_size.height.as_int(), 0, 0);
1128- auto window = mir_create_window_sync(spec);
1129+ auto window = mir_create_window(spec);
1130 mir_window_spec_release(spec);
1131
1132 EXPECT_THAT(window, IsValid());
1133@@ -172,7 +172,7 @@
1134 auto spec = mir_create_normal_window_spec(connection, width, height);
1135 mir_window_spec_set_pixel_format(spec, format);
1136 mir_surface_spec_add_render_surface(spec, rs, width, height, 0, 0);
1137- auto window = mir_create_window_sync(spec);
1138+ auto window = mir_create_window(spec);
1139 mir_window_spec_release(spec);
1140 auto bs = mir_render_surface_get_buffer_stream(rs,
1141 640, 480,
1142@@ -236,7 +236,7 @@
1143 auto spec = mir_create_normal_window_spec(connection, width, height);
1144 mir_window_spec_set_pixel_format(spec, format);
1145 mir_surface_spec_add_render_surface(spec, rs, width, height, 0, 0);
1146- auto window = mir_create_window_sync(spec);
1147+ auto window = mir_create_window(spec);
1148 mir_window_spec_release(spec);
1149 auto pc = mir_render_surface_get_presentation_chain(rs);
1150
1151
1152=== modified file 'tests/acceptance-tests/test_server_disconnect.cpp'
1153--- tests/acceptance-tests/test_server_disconnect.cpp 2017-01-18 13:59:18 +0000
1154+++ tests/acceptance-tests/test_server_disconnect.cpp 2017-01-19 08:14:45 +0000
1155@@ -120,7 +120,7 @@
1156 create_surface.exec([&] {
1157 auto spec = mir_create_normal_window_spec(connection, 800, 600);
1158 mir_window_spec_set_pixel_format(spec, mir_pixel_format_xbgr_8888);
1159- window = mir_create_window_sync(spec);
1160+ window = mir_create_window(spec);
1161 mir_window_spec_release(spec);
1162 });
1163
1164
1165=== modified file 'tests/acceptance-tests/test_surface_morphing.cpp'
1166--- tests/acceptance-tests/test_surface_morphing.cpp 2017-01-18 02:29:37 +0000
1167+++ tests/acceptance-tests/test_surface_morphing.cpp 2017-01-19 08:14:45 +0000
1168@@ -104,7 +104,7 @@
1169
1170 specifier(spec);
1171
1172- auto const window = mir_create_window_sync(spec);
1173+ auto const window = mir_create_window(spec);
1174 mir_window_spec_release(spec);
1175
1176 return SurfaceHandle{window};
1177
1178=== modified file 'tests/acceptance-tests/test_surface_placement.cpp'
1179--- tests/acceptance-tests/test_surface_placement.cpp 2017-01-18 02:29:37 +0000
1180+++ tests/acceptance-tests/test_surface_placement.cpp 2017-01-19 08:14:45 +0000
1181@@ -90,7 +90,7 @@
1182
1183 specifier(spec);
1184
1185- auto const window = mir_create_window_sync(spec);
1186+ auto const window = mir_create_window(spec);
1187 mir_window_spec_release(spec);
1188
1189 return window;
1190@@ -103,7 +103,7 @@
1191
1192 specifier(spec);
1193
1194- auto const window = mir_create_window_sync(spec);
1195+ auto const window = mir_create_window(spec);
1196 mir_window_spec_release(spec);
1197
1198 return window;
1199
1200=== modified file 'tests/acceptance-tests/test_system_compositor_window_manager.cpp'
1201--- tests/acceptance-tests/test_system_compositor_window_manager.cpp 2017-01-18 02:29:37 +0000
1202+++ tests/acceptance-tests/test_system_compositor_window_manager.cpp 2017-01-19 08:14:45 +0000
1203@@ -78,7 +78,7 @@
1204
1205 mir_window_spec_set_pixel_format(spec, mir_pixel_format_bgr_888);
1206 mir_window_spec_set_fullscreen_on_output(spec, output_id);
1207- auto const window = mir_create_window_sync(spec);
1208+ auto const window = mir_create_window(spec);
1209 mir_window_spec_release(spec);
1210
1211 mir_window_set_event_handler(window, on_surface_event, this);
1212
1213=== modified file 'tests/integration-tests/client/test_mirsurface.cpp'
1214--- tests/integration-tests/client/test_mirsurface.cpp 2017-01-18 02:29:37 +0000
1215+++ tests/integration-tests/client/test_mirsurface.cpp 2017-01-19 08:14:45 +0000
1216@@ -150,7 +150,7 @@
1217
1218 std::unique_ptr<MirWindow, std::function<void(MirWindow*)>> create_surface(MirWindowSpec* spec)
1219 {
1220- return {mir_create_window_sync(spec), [](MirWindow *window){mir_window_release_sync(window);}};
1221+ return {mir_create_window(spec), [](MirWindow *window){mir_window_release_sync(window);}};
1222 }
1223
1224 MirWindowSpec spec{nullptr, 640, 480, mir_pixel_format_abgr_8888};
1225
1226=== modified file 'tests/integration-tests/test_error_reporting.cpp'
1227--- tests/integration-tests/test_error_reporting.cpp 2017-01-18 02:29:37 +0000
1228+++ tests/integration-tests/test_error_reporting.cpp 2017-01-19 08:14:45 +0000
1229@@ -132,7 +132,7 @@
1230 auto const spec = mir_create_normal_window_spec(connection, 640, 480);
1231 mir_window_spec_set_pixel_format(spec, mir_pixel_format_abgr_8888);
1232
1233- auto const window = mir_create_window_sync(spec);
1234+ auto const window = mir_create_window(spec);
1235 mir_window_spec_release(spec);
1236
1237 ASSERT_TRUE(window != NULL);
1238
1239=== modified file 'tests/integration-tests/test_surfaceloop.cpp'
1240--- tests/integration-tests/test_surfaceloop.cpp 2017-01-18 02:29:37 +0000
1241+++ tests/integration-tests/test_surfaceloop.cpp 2017-01-19 08:14:45 +0000
1242@@ -165,7 +165,7 @@
1243 TEST_F(SurfaceLoop, all_created_buffers_are_destroyed)
1244 {
1245 for (int i = 0; i != max_surface_count; ++i)
1246- window[i] = mir_create_window_sync(surface_spec);
1247+ window[i] = mir_create_window(surface_spec);
1248
1249 for (int i = 0; i != max_surface_count; ++i)
1250 mir_window_release_sync(window[i]);
1251@@ -174,5 +174,5 @@
1252 TEST_F(SurfaceLoop, all_created_buffers_are_destroyed_if_client_disconnects_without_releasing_surfaces)
1253 {
1254 for (int i = 0; i != max_surface_count; ++i)
1255- window[i] = mir_create_window_sync(surface_spec);
1256+ window[i] = mir_create_window(surface_spec);
1257 }
1258
1259=== modified file 'tests/mir_test_framework/any_surface.cpp'
1260--- tests/mir_test_framework/any_surface.cpp 2017-01-18 02:29:37 +0000
1261+++ tests/mir_test_framework/any_surface.cpp 2017-01-19 08:14:45 +0000
1262@@ -42,7 +42,7 @@
1263
1264 auto spec = mir_create_normal_window_spec(connection, size.width.as_int(), size.height.as_int());
1265 mir_window_spec_set_pixel_format(spec, f);
1266- auto window = mir_create_window_sync(spec);
1267+ auto window = mir_create_window(spec);
1268 mir_window_spec_release(spec);
1269
1270 if (!mir_window_is_valid(window))
1271
1272=== modified file 'tests/mir_test_framework/connected_client_with_a_surface.cpp'
1273--- tests/mir_test_framework/connected_client_with_a_surface.cpp 2017-01-18 02:29:37 +0000
1274+++ tests/mir_test_framework/connected_client_with_a_surface.cpp 2017-01-19 08:14:45 +0000
1275@@ -31,7 +31,7 @@
1276 mir_window_spec_set_name(spec, "ConnectedClientWithASurfaceFixtureSurface");
1277 mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_hardware);
1278
1279- window = mir_create_window_sync(spec);
1280+ window = mir_create_window(spec);
1281 mir_window_spec_release(spec);
1282 ASSERT_TRUE(mir_window_is_valid(window));
1283 }
1284
1285=== modified file 'tests/mir_test_framework/visible_surface.cpp'
1286--- tests/mir_test_framework/visible_surface.cpp 2017-01-18 02:29:37 +0000
1287+++ tests/mir_test_framework/visible_surface.cpp 2017-01-19 08:14:45 +0000
1288@@ -23,7 +23,7 @@
1289 visible{false}
1290 {
1291 mir_window_spec_set_event_handler(spec, VisibleSurface::event_callback, this);
1292- window = mir_create_window_sync(spec);
1293+ window = mir_create_window(spec);
1294 // Swap buffers to ensure window is visible for event based tests
1295 if (mir_window_is_valid(window))
1296 {
1297
1298=== modified file 'tests/performance-tests/test_client_startup.cpp'
1299--- tests/performance-tests/test_client_startup.cpp 2017-01-18 02:29:37 +0000
1300+++ tests/performance-tests/test_client_startup.cpp 2017-01-19 08:14:45 +0000
1301@@ -71,7 +71,7 @@
1302
1303 auto spec = mir_create_normal_window_spec(connection, 720, 1280);
1304 mir_window_spec_set_pixel_format(spec, format);
1305- auto window = mir_create_window_sync(spec);
1306+ auto window = mir_create_window(spec);
1307
1308 mir_window_spec_release(spec);
1309
1310
1311=== modified file 'tests/privileged-tests/test_input_events.cpp'
1312--- tests/privileged-tests/test_input_events.cpp 2017-01-18 02:29:37 +0000
1313+++ tests/privileged-tests/test_input_events.cpp 2017-01-19 08:14:45 +0000
1314@@ -209,7 +209,7 @@
1315 mir_connection_get_available_surface_formats(connection, &pixel_format, 1, &valid_formats);
1316 auto spec = mir_create_normal_window_spec(connection, 640, 480);
1317 mir_window_spec_set_pixel_format(spec, pixel_format);
1318- auto const window = mir_create_window_sync(spec);
1319+ auto const window = mir_create_window(spec);
1320 mir_window_spec_release(spec);
1321 if (!mir_window_is_valid(window))
1322 throw std::runtime_error("Failed to create MirWindow");
1323
1324=== modified file 'tests/test-clients/impolite-shutdown/scroll.cpp'
1325--- tests/test-clients/impolite-shutdown/scroll.cpp 2017-01-18 02:29:37 +0000
1326+++ tests/test-clients/impolite-shutdown/scroll.cpp 2017-01-19 08:14:45 +0000
1327@@ -82,7 +82,7 @@
1328 mir_window_spec_set_name(spec.get(), __PRETTY_FUNCTION__);
1329 mir_window_spec_set_buffer_usage(spec.get(), mir_buffer_usage_hardware);
1330
1331- MirWindow *window = mir_create_window_sync(spec.get());
1332+ MirWindow *window = mir_create_window(spec.get());
1333 spec.reset();
1334
1335 assert(window != NULL);
1336
1337=== modified file 'tests/test-clients/mir-stress/src/client.cpp'
1338--- tests/test-clients/mir-stress/src/client.cpp 2017-01-18 13:59:18 +0000
1339+++ tests/test-clients/mir-stress/src/client.cpp 2017-01-19 08:14:45 +0000
1340@@ -78,7 +78,7 @@
1341 mir_window_spec_set_name(spec, __PRETTY_FUNCTION__);
1342 mir_window_spec_set_buffer_usage(spec, mir_buffer_usage_software);
1343
1344- surface_ = mir_create_window_sync(spec);
1345+ surface_ = mir_create_window(spec);
1346 mir_window_spec_release(spec);
1347
1348 return true;

Subscribers

People subscribed via source and target branches