~vanvugt/mir/handoff

« back to all changes in this revision

Viewing changes to tests/mir_test_doubles/platform_factory.cpp

  • Committer: Daniel van Vugt
  • Date: 2015-08-12 09:52:57 UTC
  • mfrom: (2798.1.41 trunk)
  • Revision ID: daniel.van.vugt@canonical.com-20150812095257-58wduov90c2mpiqs
Merge latest trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
auto mtd::create_platform_with_null_dependencies()
64
64
    -> std::shared_ptr<graphics::Platform>
65
65
{
66
 
    return std::make_shared<graphics::X::Platform>();
 
66
    return std::make_shared<graphics::X::Platform>(std::shared_ptr<::Display>(
 
67
                                                       XOpenDisplay(nullptr),
 
68
                                                       [](::Display* display)
 
69
                                                       {
 
70
                                                           XCloseDisplay(display);
 
71
                                                       }));
67
72
}
68
73
#endif