OSDN Git Service

Drop an unused function.
authorLoRd_MuldeR <mulder2@gmx.de>
Thu, 23 Dec 2021 20:09:07 +0000 (21:09 +0100)
committerLoRd_MuldeR <mulder2@gmx.de>
Thu, 23 Dec 2021 20:09:07 +0000 (21:09 +0100)
include/MUtils/GUI.h
src/GUI_Win32.cpp

index 54e8b45..20109a3 100644 (file)
@@ -81,7 +81,6 @@ namespace MUtils
 
                //Sheet of glass
                MUTILS_API bool sheet_of_glass(QWidget *const window);
 
                //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);
 
                //System colors
                MUTILS_API QColor system_color(const int &color_id);
index 3338e9a..cd469a8 100644 (file)
@@ -232,44 +232,6 @@ bool MUtils::GUI::sheet_of_glass(QWidget *const window)
        return true;
 }
 
        return true;
 }
 
-bool MUtils::GUI::sheet_of_glass_update(QWidget *const window)
-{
-       const DwmIsCompositionEnabledFun      dwmIsCompositionEnabledFun      = MUtils::Win32Utils::resolve<DwmIsCompositionEnabledFun>     (QLatin1String("dwmapi"), QLatin1String("DwmIsCompositionEnabled")     );
-       const DwmExtendFrameIntoClientAreaFun dwmExtendFrameIntoClientAreaFun = MUtils::Win32Utils::resolve<DwmExtendFrameIntoClientAreaFun>(QLatin1String("dwmapi"), QLatin1String("DwmExtendFrameIntoClientArea"));
-       const DwmEnableBlurBehindWindowFun    dwmEnableBlurBehindWindowFun    = MUtils::Win32Utils::resolve<DwmEnableBlurBehindWindowFun>   (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<HWND>(window->winId()), &bb))
-       {
-               qWarning("DwmEnableBlurBehindWindow function has failed! (error %d)", hr);
-               return false;
-       }
-
-       return true;
-}
-
 ///////////////////////////////////////////////////////////////////////////////
 // SYSTEM COLORS
 ///////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////
 // SYSTEM COLORS
 ///////////////////////////////////////////////////////////////////////////////