~ci-train-bot/miral/miral-ubuntu-zesty-2299

« back to all changes in this revision

Viewing changes to test/test_server.h

  • Committer: Bileto Bot
  • Date: 2016-11-30 08:40:00 UTC
  • mfrom: (340.1.2 miral-release)
  • Revision ID: ci-train-bot@canonical.com-20161130084000-q9mfvwqsbdr078ec
* New upstream release 0.5.0 (https://launchpad.net/miral/+milestone/0.5)
  - ABI summary:
    . miral ABI unchanged at 1
  - Enhancements:
    . Add miral::DebugExtension allowing shells to enable & disable support
      for debug extension API(s) dynamically
    . Improve handling of fullscreen surfaces when switching outputs, or
      specified output doesn't exist (any more)
    . Initial tests and some fixes for tracking of active window.
    . Document the order of windows passed to
      WindowManagementPolicy::advise_raise() so clients can rely on it.
    . [examples] Add miral-desktop script for launching a pseudo-desktop
    . [examples] Add miral-screencast - a utility script to assist with
      creating a screencast
    . [examples: miral-shell --window-manager tiling] implement the layout
      suggested in "Tasks for the interested reader"
    . [examples: miral-shell --window-manager tiling] Don't place a tile
      until the first window is ready
    . [examples: miral-kiosk] Provide configuration options for kiosk:
      --keymap --kiosk-maximize-root-windows & --kiosk-startup-apps-only
  - Bugs fixed:
    . Display configuration changes may cause "fatal errors" when there are
      fullscreen windows (LP: #1640557)

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include <list>
34
34
#include <mutex>
35
35
 
 
36
namespace mir { namespace shell { class WindowManager; }}
 
37
 
36
38
namespace miral
37
39
{
 
40
class WindowManagementPolicy;
38
41
class TestRuntimeEnvironment
39
42
{
40
43
public:
54
57
    auto connect_client(std::string name) -> toolkit::Connection;
55
58
 
56
59
    using TestRuntimeEnvironment::add_to_environment;
57
 
    WindowManagerTools tools{nullptr};
58
60
 
59
61
    MirRunner runner;
60
62
 
 
63
    void invoke_tools(std::function<void(WindowManagerTools& tools)> const& f);
 
64
    void invoke_window_manager(std::function<void(mir::shell::WindowManager& wm)> const& f);
 
65
 
61
66
private:
62
67
    struct TestWindowManagerPolicy;
63
68
 
 
69
    WindowManagerTools tools{nullptr};
 
70
    WindowManagementPolicy* policy{nullptr};
 
71
    std::weak_ptr<mir::shell::WindowManager> window_manager;
64
72
    mir::test::AutoJoinThread server_thread;
65
73
    std::mutex mutex;
66
74
    std::condition_variable started;