Flicker on Windows 7 with Aero disabled when moving any window over a Qt Quick based window - a bug in qwindowswindow.cpp?



  • Hi,

    I am new to Qt Quick. It is really helpful for me to prototype UI part for my project.

    But I found such an issue - when moving any window over a Qt Quick based window, I saw horrible flickers. And this issue only appears when Areo of Windows 7 is disabled.

    I looked into Qt 5.5's source code and found the following problematic lines in qwindowswindow.cpp, from line 1503.

    bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message,
    WPARAM, LPARAM)
    {
    // Ignore invalid update bounding rectangles
    if (!GetUpdateRect(m_data.hwnd, 0, FALSE))
    return false;
    if (message == WM_ERASEBKGND) // Backing store - ignored.
    return true;
    PAINTSTRUCT ps;

    The first 'if' statement returning false makes the second 'if' statement failed in some case. Then Windows refreshes background for QWindow with some system color. This should be an unexpected behavior.

    After exchanging the two 'if' statements, the flicker goes away.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.