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:
parent
391b5a465e
commit
67bed5616b
@ -88,7 +88,8 @@ void QWindowsBackingStore::flush(QWindow *window, const QRegion ®ion,
|
||||
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 ®ion,
|
||||
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()};
|
||||
|
Loading…
Reference in New Issue
Block a user