Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
5.2.1
-
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
Issue Links
- is replaced by
-
QTBUG-17548 Widget with Qt::FramelessWindowHint and Qt::WA_TranslucentBackground stops painting after minimize/restore
- Closed