Fix broken fading of menus.

Breakage introduced by   b3820b12fb
Set layered in backing store for frameless windows as was before.

Task-number: QTBUG-29010
Task-number: QTBUG-28531
Change-Id: I13f8f0d58d71b6612430c7048056f672e23b8095
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Friedemann Kleint 2013-02-07 15:58:31 +01:00 committed by The Qt Project
parent 391b5a465e
commit 67bed5616b

View File

@ -88,7 +88,8 @@ void QWindowsBackingStore::flush(QWindow *window, const QRegion &region,
QWindowsWindow *rw = QWindowsWindow::baseWindowOf(window);
#ifndef Q_OS_WINCE
if (QWindowsWindow::setWindowLayered(rw->handle(), window->flags(), rw->format().hasAlpha(), rw->opacity())) {
const Qt::WindowFlags flags = window->flags();
if ((flags & Qt::FramelessWindowHint) && QWindowsWindow::setWindowLayered(rw->handle(), flags, rw->format().hasAlpha(), rw->opacity())) {
QRect r = window->frameGeometry();
QPoint frameOffset(window->frameMargins().left(), window->frameMargins().top());
QRect dirtyRect = br.translated(offset + frameOffset);
@ -97,7 +98,6 @@ void QWindowsBackingStore::flush(QWindow *window, const QRegion &region,
POINT ptDst = {r.x(), r.y()};
POINT ptSrc = {0, 0};
BLENDFUNCTION blend = {AC_SRC_OVER, 0, (BYTE)(255.0 * rw->opacity()), AC_SRC_ALPHA};
if (QWindowsContext::user32dll.updateLayeredWindowIndirect) {
RECT dirty = {dirtyRect.x(), dirtyRect.y(),
dirtyRect.x() + dirtyRect.width(), dirtyRect.y() + dirtyRect.height()};