Drop an unused function.

This commit is contained in:
LoRd_MuldeR 2021-12-23 21:09:07 +01:00
parent 2eb036fbad
commit 05e9b6aefc
2 changed files with 0 additions and 39 deletions

View File

@ -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);

View File

@ -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<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
///////////////////////////////////////////////////////////////////////////////