From b3820b12fbded1f173837eee7f7559783e92b46b Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 6 Feb 2013 11:38:26 +0100 Subject: Windows: Fix setting of layered windows. The setting/clearing of WS_EX_LAYERED in the backing store interfered with the setting/clearing in setWindowOpacity when combining translucent and non-opaque windows. Introduce QWindowsWindow::setWindowLayered to handle it consistently. Task-number: QTBUG-29010 Task-number: QTBUG-28531 Change-Id: Ib6e2740aae417bdf7b3db9ef7deb646be98df1d6 Reviewed-by: Joerg Bornemann --- src/plugins/platforms/windows/qwindowsbackingstore.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/plugins/platforms/windows/qwindowsbackingstore.cpp') diff --git a/src/plugins/platforms/windows/qwindowsbackingstore.cpp b/src/plugins/platforms/windows/qwindowsbackingstore.cpp index 792eaf0fdc..0a7ff61b7b 100644 --- a/src/plugins/platforms/windows/qwindowsbackingstore.cpp +++ b/src/plugins/platforms/windows/qwindowsbackingstore.cpp @@ -88,11 +88,7 @@ void QWindowsBackingStore::flush(QWindow *window, const QRegion ®ion, QWindowsWindow *rw = QWindowsWindow::baseWindowOf(window); #ifndef Q_OS_WINCE - if (rw->format().hasAlpha() && (window->flags() & Qt::FramelessWindowHint)) { - const long wl = GetWindowLong(rw->handle(), GWL_EXSTYLE); - if ((wl & WS_EX_LAYERED) == 0) - SetWindowLong(rw->handle(), GWL_EXSTYLE, wl | WS_EX_LAYERED); - + if (QWindowsWindow::setWindowLayered(rw->handle(), window->flags(), rw->format().hasAlpha(), rw->opacity())) { QRect r = window->frameGeometry(); QPoint frameOffset(window->frameMargins().left(), window->frameMargins().top()); QRect dirtyRect = br.translated(offset + frameOffset); -- cgit v1.2.3