Windows QPA: QWindowsWindow - always treat WM_ERASEBKGND as handled

under certain conditions, a WM_ERASEBKGND message is sent, to a window
without update region. in this case we declare the message as 'handled'
to avoid flickering.

Task-number: QTBUG-48235
Change-Id: I2ed27e020db4b54ec93a445cb219de00f38a62fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
bb10
Tim Blechmann 2016-02-29 19:47:57 +08:00
parent d7d4a3ecfc
commit c2530c7d20
1 changed files with 2 additions and 2 deletions

View File

@ -1559,11 +1559,11 @@ void QWindowsWindow::releaseDC()
bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message,
WPARAM, LPARAM)
{
if (message == WM_ERASEBKGND) // Backing store - ignored.
return true;
// 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;
// Observed painting problems with Aero style disabled (QTBUG-7865).