Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt5.11.1: DirectFb block generic plugin



  • Hello!
    I cross-compile Qt-5.11.1 for Broadcom mips SoC with DirectFb support, application success start, output to screen present and application get commands from IR.
    But I have custom generic plugin, I use QT_QPA_GENERIC_PLUGINS environment for load it, plugin success load and get commands from user, but application not get commands from it.

    Register generic plugin

    QInputDeviceManagerPrivate::get(
        QGuiApplicationPrivate::inputDeviceManager())->setDeviceCount(
            QInputDeviceManager::DeviceTypeKeyboard, 1);
    

    Send event from plugin

    struct KeyStatus {
        quint32 code;
        bool press;
        bool repeat;
    };
    KeyStatus status = ...;
    QWindowSystemInterface::handleKeyEvent(0,
        status.press ? QEvent::KeyPress : QEvent::KeyRelease,
        status.code,
        0,
        QString(),
        status.repeat); 
    

    Why application not get commands from custom plugin if it use DirectFb? I also use with plugin if application use LinuxFb and in this case problem not present.
    DirectFb plugin can block/disable commands from other generic plugins?

    Thank you and excuse me my bad English.



  • $ git diff
    diff --git a/src/plugins/platforms/directfb/qdirectfbinput.cpp b/src/plugins/platforms/directfb/qdirectfbinput.cpp
    index 025edb28b5..33d6328aef 100644
    --- a/src/plugins/platforms/directfb/qdirectfbinput.cpp
    +++ b/src/plugins/platforms/directfb/qdirectfbinput.cpp
    @@ -188,7 +188,7 @@ void QDirectFbInput::handleKeyEvents(const DFBEvent &event)
         if (DFB_KEY_TYPE(event.window.key_symbol) == DIKT_UNICODE)
             character = QChar(event.window.key_symbol);
         QWindow *tlw = m_tlwMap.value(event.window.window_id);
    -    QWindowSystemInterface::handleKeyEvent(tlw, timestamp, type, key, modifiers, character);
    +    QWindowSystemInterface::handleKeyEvent(/*tlw*/nullptr, timestamp, type, key, modifiers, character);
     }
     
     void QDirectFbInput::handleEnterLeaveEvents(const DFBEvent &event)
    

    With this changes app also not get keyboard event from directfb plugin.


Log in to reply