summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp34
1 files changed, 5 insertions, 29 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index a282f7c238..3e291f310d 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -360,20 +360,11 @@ static inline bool windowIsAccelerated(const QWindow *w)
static bool applyBlurBehindWindow(HWND hwnd)
{
- BOOL compositionEnabled;
- if (DwmIsCompositionEnabled(&compositionEnabled) != S_OK)
- return false;
-
DWM_BLURBEHIND blurBehind = {0, 0, nullptr, 0};
- if (compositionEnabled) {
- blurBehind.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION;
- blurBehind.fEnable = TRUE;
- blurBehind.hRgnBlur = CreateRectRgn(0, 0, -1, -1);
- } else {
- blurBehind.dwFlags = DWM_BB_ENABLE;
- blurBehind.fEnable = FALSE;
- }
+ blurBehind.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION;
+ blurBehind.fEnable = TRUE;
+ blurBehind.hRgnBlur = CreateRectRgn(0, 0, -1, -1);
const bool result = DwmEnableBlurBehindWindow(hwnd, &blurBehind) == S_OK;
@@ -2104,12 +2095,6 @@ void QWindowsWindow::releaseDC()
}
}
-static inline bool dwmIsCompositionEnabled()
-{
- BOOL dWmCompositionEnabled = FALSE;
- return SUCCEEDED(DwmIsCompositionEnabled(&dWmCompositionEnabled)) && dWmCompositionEnabled == TRUE;
-}
-
static inline bool isSoftwareGl()
{
#if QT_CONFIG(dynamicgl)
@@ -2133,22 +2118,13 @@ bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message,
return false;
PAINTSTRUCT ps;
- // GL software rendering (QTBUG-58178) and Windows 7/Aero off with some AMD cards
+ // GL software rendering (QTBUG-58178) with some AMD cards
// (QTBUG-60527) need InvalidateRect() to suppress artifacts while resizing.
- if (testFlag(OpenGLSurface) && (isSoftwareGl() || !dwmIsCompositionEnabled()))
+ if (testFlag(OpenGLSurface) && isSoftwareGl())
InvalidateRect(hwnd, nullptr, false);
BeginPaint(hwnd, &ps);
- // Observed painting problems with Aero style disabled (QTBUG-7865).
- if (Q_UNLIKELY(!dwmIsCompositionEnabled())
- && ((testFlag(OpenGLSurface) && testFlag(OpenGLDoubleBuffered))
- || testFlag(VulkanSurface)
- || testFlag(Direct3DSurface)))
- {
- SelectClipRgn(ps.hdc, nullptr);
- }
-
// If the a window is obscured by another window (such as a child window)
// we still need to send isExposed=true, for compatibility.
// Our tests depend on it.