Results 1 to 2 of 2

Thread: Qt + DirectFB == Windows Losing Focus

  1. #1
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Qt + DirectFB == Windows Losing Focus

    My apps running under DirectFB platform pluging are either permanently losing focus, or never get focus. The main window will appear, but either it has no focus so that I cannot use the mouse or keyboard, or it loses the focus the instant the cursor exits any edit widget (QLineEdit, QTextEdit, etc). 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.

    I thought this was a problem on my target platform, but it occurs on the desktop as well. With a .directfbrc file to run directfb under X11, the behavior is the same.

    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

    Is this a problem with DirectFB? Or with Qt? Any special configurations or environment variables I need? Any workarounds? I've been searching for a while but have found no answers online.

  2. #2
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt + DirectFB == Windows Losing Focus

    Source of problem found, fix applied. Basically the DirectFB places every new window at the top of the z-order by default. Which is normally the right thing to do... except for QDesktopWidget windows. The app was not getting any events because there was an invisible desktop widget in the way.

    The fix was to have the directfb plugin lower all desktop windows (those with a Qt:esktop window flag) to the bottom when created.

Similar Threads

  1. Replies: 2
    Last Post: 4th June 2014, 10:20
  2. DirectFB and no focus QWidget OSD
    By zidagar in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 17th February 2012, 12:22
  3. Using StyleSheet Without Losing 3D Effects
    By metdos in forum Qt Programming
    Replies: 1
    Last Post: 31st August 2009, 11:20
  4. QGLWidget window redrawing contents when losing focus
    By Barry79 in forum Qt Programming
    Replies: 1
    Last Post: 3rd April 2009, 14:37
  5. Windows focus / Windows Shutdown Problems
    By December in forum Qt Programming
    Replies: 6
    Last Post: 22nd October 2007, 15:10

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.