예제 #1
0
void CompositorSettings::setKeyboardRepeatDelay(quint32 delay)
{
//#if QTCOMPOSITOR_VERSION >= QT_VERSION_CHECK(5, 6, 0)
#if 0
    Q_D(CompositorSettings);

    if (keyboardRepeatDelay() == delay)
        return;

    d->compositor->defaultInputDevice()->setKeyboardRepeatDelay(delay);
    Q_EMIT keyboardRepeatDelayChanged();
#else
    Q_UNUSED(delay)
#endif
}
void CompositorSettings::setKeyboardRepeatDelay(quint32 delay)
{
    Q_D(CompositorSettings);

    if (d->repeatDelay == delay)
        return;

    d->repeatDelay = delay;
    Q_EMIT keyboardRepeatDelayChanged();

    if (d->compositor) {
        QWaylandSeat *seat = d->compositor->defaultSeat();
        if (seat && seat->keyboard())
            seat->keyboard()->setRepeatDelay(d->repeatDelay);
    }
}
예제 #3
0
void CompositorSettings::setKeyboardRepeatDelay(quint32 delay)
{
    Q_D(CompositorSettings);

    if (d->repeatDelay == delay)
        return;

    d->repeatDelay = delay;
    Q_EMIT keyboardRepeatDelayChanged();

    if (d->compositor) {
        QWaylandInputDevice *inputDevice = d->compositor->defaultInputDevice();
        if (inputDevice && inputDevice->keyboard())
            inputDevice->keyboard()->setRepeatDelay(d->repeatDelay);
    }
}