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

Frameless, transparent widget stops updating on Windows after receiving external show/hide messsages

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.2.1
    • GUI: Window management
    • None

    Description

      I'm trying to create an owned window that is an overlay for a window in another executable.

      I create a widget and set the WA_TranslucentBackground attribute and the FramelessWindowHint window flag to get a transparent window. Then I call windowHandle()->setTransientParent(QWindow::fromWinId(owningHwnd)) from the widget to make it an owned window.

      When the owning window is minimized it will send a WM_SHOWWINDOW message with lParam SW_PARENTCLOSING and my widget will be hidden. When the owning window is restored it will send WM_SHOWWINDOW with lParam SW_PARENTOPENING and my widget will show, but will have stopped updating, and the stale render buffer will be displayed.

      I have created a simple reproduction environment with two projects. First there is target which will create an 800x600 transparent window with a single QLineEdit which contains the HWND of the transparent window. Second there is outside which will show a QLineEdit for the HWND of the transparent window and two buttons "Show" and "Hide".

      When outside has the HWND of target and "Hide" is clicked it will call ShowWindow((HWND)targetWindow, SW_HIDE) to hide the window. When "Show" is then clicked it will call ShowWindow((HWND)targetWindow, SW_SHOWNOACTIVATE) which will show the transparent window but it will have stopped updating.

      Attachments

        1. qtbug38856.zip
          5 kB
        2. repro.tar.gz
          1 kB

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              asgeirb Asgeir Bjarni Ingvarsson
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes