I'm creating a Qt/C++ application using QML for some parts. Under windows I would like to make use of the translucent windowing using ExtendFrameIntoClientArea as seen in this snippet from my window class.
#ifdef Q_WS_WIN
if ( QSysInfo::windowsVersion() == QSysInfo::WV_VISTA ||
QSysInfo::windowsVersion() == QSysInfo::WV_WINDOWS7 )
{
EnableBlurBehindWidget(this, true);
ExtendFrameIntoClientArea(this);
}
#else
The code is working nicely with one exception. If the transparent window system is turned off the background becomes black, and as part of my UI is transparent it becomes dark as well. The same thing happens when logging in to a remote computer running the application, even if the transparent windowing system is re-initialized immediately the background stays black until the above code is executed again. This is demonstrated in this image: Comparison of failed rendering (in background) and correct (in front).
The problem is to find a signal to connect to re-initializing the transparent window, or better yet to detect when windows are drawn transparently and draw the UI accordingly. Any alternative solutions are also welcome.