Beispiel #1
0
void ms::SurfaceStack::raise(SurfaceSet const& ss)
{
    bool surfaces_reordered{false};
    {
        std::lock_guard<decltype(guard)> ul(guard);

        auto const old_surfaces = surfaces;
        std::stable_partition(
            begin(surfaces), end(surfaces),
            [&](std::weak_ptr<Surface> const& s) { return !ss.count(s); });

        if (old_surfaces != surfaces)
            surfaces_reordered = true;
    }

    if (surfaces_reordered)
        observers.surfaces_reordered();
}