~mzanetti/qtubuntu/dpr

« back to all changes in this revision

Viewing changes to src/ubuntumirclient/input.cpp

  • Committer: CI Train Bot
  • Author(s): Robert Carr
  • Date: 2014-12-12 15:43:19 UTC
  • mfrom: (242.5.2 fix-auto-repeat)
  • Revision ID: ci-train-bot@canonical.com-20141212154319-me61bvd5won4q1q9
Utilize repeat_count value from Mir in constructing QKeyEvents. Fixes: #1349416
Approved by: Daniel d'Andrada, PS Jenkins bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
408
408
    int sym = translateKeysym(xk_sym, s, sizeof(s));
409
409
    QString text = QString::fromLatin1(s);
410
410
 
 
411
    bool is_auto_rep = event->key.repeat_count > 0;
 
412
 
411
413
    QPlatformInputContext* context = QGuiApplicationPrivate::platformIntegration()->inputContext();
412
414
    if (context) {
413
 
        QKeyEvent qKeyEvent(keyType, sym, modifiers, text);
 
415
        QKeyEvent qKeyEvent(keyType, sym, modifiers, text, is_auto_rep);
414
416
        qKeyEvent.setTimestamp(timestamp);
415
417
        if (context->filterEvent(&qKeyEvent)) {
416
418
            DLOG("key event filtered out by input context");
418
420
        }
419
421
    }
420
422
 
421
 
    QWindowSystemInterface::handleKeyEvent(window, timestamp, keyType, sym, modifiers, text);
 
423
    QWindowSystemInterface::handleKeyEvent(window, timestamp, keyType, sym, modifiers, text, is_auto_rep);
422
424
}
423
425
 
424
426
#if (LOG_EVENTS != 0)