Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-41970

Windows do not receive focus with directfb platform plugin

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.4.0
    • 5.3.1
    • Core: Plugins
    • None
    • Linux 3.8.0-44-generic #66~precise1-Ubuntu SMP
      g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
      Using Qt version 5.3.1 in /usr/local/Qt-5.3.1/lib
    • 3fcebba79c34736109e5e3feb540adf8be1db525

    Description

      Apps running under DirectFB platform plugin are either permanently losing focus, or never get focus. The main window will appear, but either it has no focus so that the mouse or keyboard cannot be used, or it loses the focus the instant the cursor exits any edit widget. This applies to all widgets, buttons are not clickable, sliders will not slide, etc.

      Some apps seem to be fine, but most apps show the problem. I am unsure what the difference is. For example, the "wiggly" example works fine, but the "lineedits" and "calculator" examples do not.

      To reproduce (on desktop):

      • Create a minimal .directfbfc file under Linux/Unix (just put in the line "system=x11"), and make sure Qt was build with directfb support.
      • run wiggly: wiggly -platform directfb
      • run lineedits: lineedits -platform directfb

      Discovered that this is the result of a QDesktopWidget window being placed at the top of the window stack. This occurs in QDirectFbInput::addWindow(), where all windows are treated the same. A potential fix is to lower all windows with the Qt::Desktop flag. I applied the following code to my copy of the plugin:

      // desktop windows go to the bottom, all others to the top
      if (platformWindow->flags() & (Qt::Desktop & ~Qt::Window) )

      { window->LowerToBottom(window); }

      else

      { window->RaiseToTop(window); }

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            janichol Andy Nichols
            brandybuck David Johnson
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes