示例#1
0
void Compositor::setOutputGeometry(void *c, const QList<QVariant> &parameters)
{
    Compositor *compositor = static_cast<Compositor *>(c);
    compositor->m_outputGeometry = parameters.first().toRect();

    wl_resource *resource;
    wl_list_for_each(resource, &compositor->m_outputResources, link)
        compositor->sendOutputGeometry(resource);
}
示例#2
0
void Compositor::bindOutput(wl_client *client, void *compositorData, uint32_t version, uint32_t id)
{
    Q_UNUSED(version);

    wl_resource *resource = wl_client_add_object(client, &wl_output_interface, 0, id, compositorData);

    Compositor *compositor = static_cast<Compositor *>(compositorData);
    registerResource(&compositor->m_outputResources, resource);

    compositor->sendOutputGeometry(resource);
    compositor->sendOutputMode(resource);
}