void InputRegionPrivate::update()
{
    Q_Q(InputRegion);
    q->killTimer(updateTimerId);
    updateTimerId = 0;

    if (window && window->handle()) {
        QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
        native->setWindowProperty(window->handle(), QLatin1String("MOUSE_REGION"), QVariant(QRegion(x, y, width, height)));
    }
}
示例#2
0
int main(int argc, char *argv[])
{
    QScopedPointer<QGuiApplication> app (SailfishApp::application(argc, argv));
    QScopedPointer<QQuickView> view (SailfishApp::createView());

    MGConfItem partnerSpaceQml (PARTNERSPACEMANAGER_QML_DCONF);
    QString qmlFile = partnerSpaceQml.value(QString()).toString();
    if (qmlFile.isEmpty()) {
        return 1;
    }
    qDebug() << "Running partner-space launcher with" << qmlFile;

    view->setSource(QUrl(qmlFile));

    // The view is a partner window
    view->create();
    QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
    native->setWindowProperty(view->handle(), QLatin1String("CATEGORY"), QString(QLatin1String("partner")));
    view->show();

    return app->exec();
}