~raof/mir/prober-drm-device-probe

« back to all changes in this revision

Viewing changes to src/server/shell/application_session.cpp

  • Committer: Daniel van Vugt
  • Date: 2013-04-24 05:22:20 UTC
  • mfrom: (628 trunk)
  • mto: This revision was merged to the branch mainline in revision 629.
  • Revision ID: daniel.van.vugt@canonical.com-20130424052220-qhpyhw2resxzr7bq
MergeĀ latestĀ lp:mir

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
    }
54
54
}
55
55
 
 
56
void msh::ApplicationSession::set_event_sink(
 
57
    std::shared_ptr<mir::EventSink> const& sink)
 
58
{
 
59
    event_sink = sink;
 
60
}
 
61
 
56
62
mf::SurfaceId msh::ApplicationSession::next_id()
57
63
{
58
64
    return mf::SurfaceId(next_surface_id.fetch_add(1));
63
69
    auto surf = surface_factory->create_surface(params);
64
70
    auto const id = next_id();
65
71
 
 
72
    surf->set_id(id);
 
73
    surf->set_event_target(event_sink);
 
74
 
66
75
    std::unique_lock<std::mutex> lock(surfaces_mutex);
67
76
    surfaces[id] = surf;
68
77
    return id;