Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt5.11.1: DirectFb block generic plugin
Forum Updated to NodeBB v4.3 + New Features

Qt5.11.1: DirectFb block generic plugin

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 1 Posters 366 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    debian
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      debian
      wrote on last edited by
      #2
      $ 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.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved