From 05e9b6aefc200302a03913a5e662a83822049e2a Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Thu, 23 Dec 2021 21:09:07 +0100 Subject: [PATCH] Drop an unused function. --- include/MUtils/GUI.h | 1 - src/GUI_Win32.cpp | 38 -------------------------------------- 2 files changed, 39 deletions(-) diff --git a/include/MUtils/GUI.h b/include/MUtils/GUI.h index 54e8b45..20109a3 100644 --- a/include/MUtils/GUI.h +++ b/include/MUtils/GUI.h @@ -81,7 +81,6 @@ namespace MUtils //Sheet of glass MUTILS_API bool sheet_of_glass(QWidget *const window); - MUTILS_API bool sheet_of_glass_update(QWidget *const window); //System colors MUTILS_API QColor system_color(const int &color_id); diff --git a/src/GUI_Win32.cpp b/src/GUI_Win32.cpp index 3338e9a..cd469a8 100644 --- a/src/GUI_Win32.cpp +++ b/src/GUI_Win32.cpp @@ -232,44 +232,6 @@ bool MUtils::GUI::sheet_of_glass(QWidget *const window) return true; } -bool MUtils::GUI::sheet_of_glass_update(QWidget *const window) -{ - const DwmIsCompositionEnabledFun dwmIsCompositionEnabledFun = MUtils::Win32Utils::resolve (QLatin1String("dwmapi"), QLatin1String("DwmIsCompositionEnabled") ); - const DwmExtendFrameIntoClientAreaFun dwmExtendFrameIntoClientAreaFun = MUtils::Win32Utils::resolve(QLatin1String("dwmapi"), QLatin1String("DwmExtendFrameIntoClientArea")); - const DwmEnableBlurBehindWindowFun dwmEnableBlurBehindWindowFun = MUtils::Win32Utils::resolve (QLatin1String("dwmapi"), QLatin1String("DwmEnableBlurBehindWindow") ); - - //Required functions available? - BOOL bCompositionEnabled = FALSE; - if(dwmIsCompositionEnabledFun && dwmExtendFrameIntoClientAreaFun && dwmEnableBlurBehindWindowFun) - { - //Check if composition is currently enabled - if(HRESULT hr = dwmIsCompositionEnabledFun(&bCompositionEnabled)) - { - qWarning("DwmIsCompositionEnabled function has failed! (error %d)", hr); - return false; - } - } - - //All functions available *and* composition enabled? - if(!bCompositionEnabled) - { - return false; - } - - //Create and populate the Blur Behind structure - DWM_BLURBEHIND bb; - memset(&bb, 0, sizeof(DWM_BLURBEHIND)); - bb.fEnable = TRUE; - bb.dwFlags = DWM_BB_ENABLE; - if(HRESULT hr = dwmEnableBlurBehindWindowFun(reinterpret_cast(window->winId()), &bb)) - { - qWarning("DwmEnableBlurBehindWindow function has failed! (error %d)", hr); - return false; - } - - return true; -} - /////////////////////////////////////////////////////////////////////////////// // SYSTEM COLORS ///////////////////////////////////////////////////////////////////////////////