Ejemplo n.º 1
0
void LipstickCompositor::surfaceCreated(QWaylandSurface *surface)
{
    Q_UNUSED(surface)
    connect(surface, SIGNAL(mapped()), this, SLOT(surfaceMapped()));
    connect(surface, SIGNAL(unmapped()), this, SLOT(surfaceUnmapped()));
    connect(surface, SIGNAL(sizeChanged()), this, SLOT(surfaceSizeChanged()));
    connect(surface, SIGNAL(titleChanged()), this, SLOT(surfaceTitleChanged()));
    connect(surface, SIGNAL(windowPropertyChanged(QString,QVariant)), this, SLOT(windowPropertyChanged(QString)));
    connect(surface, SIGNAL(raiseRequested()), this, SLOT(surfaceRaised()));
    connect(surface, SIGNAL(lowerRequested()), this, SLOT(surfaceLowered()));
    connect(surface, SIGNAL(damaged(QRect)), this, SLOT(surfaceDamaged(QRect)));
}
Ejemplo n.º 2
0
void Application::receiveMessage()
{
    QLocalSocket *localSocket = d_ptr->localServer.nextPendingConnection();

    if (!localSocket->waitForReadyRead(GUI_APPLICATION_LOCAL_SOCKET_TIMEOUT))
        return;

    QByteArray byteArray = localSocket->readAll();
    const QString message = QString::fromUtf8(byteArray.constData());

    if (message == "raise")
        emit raiseRequested();

    localSocket->disconnectFromServer();
}
Ejemplo n.º 3
0
int main(int argc, char* argv[])
{
    Application application(argc, argv);

    if (application.isRunning()) {
        application.sendRaiseRequest();
        return 0;
    }

    QCoreApplication::setApplicationName("speedcrunch");
    QCoreApplication::setOrganizationDomain("speedcrunch.org");
    QCoreApplication::setOrganizationName("SpeedCrunch");

    MainWindow window;
    window.show();

    application.connect(&application, SIGNAL(lastWindowClosed()), &application, SLOT(quit()));
    application.connect(&application, SIGNAL(raiseRequested()), &window, SLOT(activate()));

    return application.exec();
}
Ejemplo n.º 4
0
void ExtendedSurface::extended_surface_raise(Resource *)
{
    emit raiseRequested();
}