From c2530c7d2005ec734cc310d9122b0bf135120444 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Mon, 29 Feb 2016 19:47:57 +0800 Subject: 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 --- src/plugins/platforms/windows/qwindowswindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/windows/qwindowswindow.cpp') diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index c0892feabe..e640d38241 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -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). -- cgit v1.2.3