Пример #1
0
void CompositorSettings::setKeyboardRepeatRate(quint32 rate)
{
//#if QTCOMPOSITOR_VERSION >= QT_VERSION_CHECK(5, 6, 0)
#if 0
    Q_D(CompositorSettings);

    if (keyboardRepeatRate() == rate)
        return;

    d->compositor->defaultInputDevice()->setKeyboardRepeatRate(rate);
    Q_EMIT keyboardRepeatRateChanged();
#else
    Q_UNUSED(rate)
#endif
}
void CompositorSettings::setKeyboardRepeatRate(quint32 rate)
{
    Q_D(CompositorSettings);

    if (d->repeatRate == rate)
        return;

    d->repeatRate = rate;
    Q_EMIT keyboardRepeatRateChanged();

    if (d->compositor) {
        QWaylandSeat *seat = d->compositor->defaultSeat();
        if (seat && seat->keyboard())
            seat->keyboard()->setRepeatRate(d->repeatRate);
    }
}
Пример #3
0
void CompositorSettings::setKeyboardRepeatRate(quint32 rate)
{
    Q_D(CompositorSettings);

    if (d->repeatRate == rate)
        return;

    d->repeatRate = rate;
    Q_EMIT keyboardRepeatRateChanged();

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