Exemplo n.º 1
0
//client implementation
Client::Client(Compositor& comp, wl_client& wlc) : wlClient_(&wlc), compositor_(&comp)
{
	ny::sendLog("creating client ", this, " for wl_client ", &wlc);

	listener_ = std::make_unique<listenerPOD>();
	listener_->listener.notify = clientDestroyListener; 
	listener_->client = this;

	wl_client_add_destroy_listener(wlClient_, &listener_->listener);
}
Exemplo n.º 2
0
QWaylandClient::QWaylandClient(wl_client *client)
    : QObject(*new QWaylandClientPrivate(client))
{
    Q_D(QWaylandClient);

    // Destroy wrapper when the client goes away
    d->listener.parent = this;
    d->listener.listener.notify = QWaylandClientPrivate::client_destroy_callback;
    wl_client_add_destroy_listener(client, &d->listener.listener);
}
Exemplo n.º 3
0
ClientConnection::Private::Private(wl_client *c, Display *display, ClientConnection *q)
    : client(c)
    , display(display)
    , q(q)
{
    s_allClients << this;
    listener.notify = destroyListenerCallback;
    wl_client_add_destroy_listener(c, &listener);
    wl_client_get_credentials(client, &pid, &user, &group);
    executablePath = QFileInfo(QStringLiteral("/proc/%1/exe").arg(pid)).symLinkTarget();
}
Exemplo n.º 4
0
/*!
 * Constructs a QWaylandClient for the \a compositor and the Wayland \a client.
 */
QWaylandClient::QWaylandClient(QWaylandCompositor *compositor, wl_client *client)
    : QObject(*new QWaylandClientPrivate(compositor, client))
{
    Q_D(QWaylandClient);

    // Destroy wrapper when the client goes away
    d->listener.parent = this;
    d->listener.listener.notify = QWaylandClientPrivate::client_destroy_callback;
    wl_client_add_destroy_listener(client, &d->listener.listener);

    QWaylandCompositorPrivate::get(compositor)->addClient(this);
}