Skip to content

Commit

Permalink
chore: hasComposite is not a requirement for hasBlurWindow
Browse files Browse the repository at this point in the history
hasBlurWindow only related to _NET_WM_DEEPIN_BLUR_REGION_ROUNDED atom in
kwin
  • Loading branch information
kegechen committed Jan 26, 2024
1 parent 19d981a commit feb5544
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions xcb/dnotitlebarwindowhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,7 @@ bool DNoTitlebarWindowHelper::updateWindowBlurAreasForWM()
if (!blurEnable || !DWMSupport::instance()->hasBlurWindow()) {
Utility::clearWindowBlur(m_windowID);

if (qEnvironmentVariableIsSet("D_DXCB_DISABLE_FORCE_BLUR"))
return true;
return true;
}

qreal device_pixel_ratio = m_window->screen()->devicePixelRatio();
Expand Down
2 changes: 1 addition & 1 deletion xcb/dxcbwmsupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ void DXcbWMSupport::updateHasBlurWindow()
bool hasBlurWindow((m_isDeepinWM && isSupportedByWM(_net_wm_deepin_blur_region_rounded_atom))
|| (m_isKwin && isContainsForRootWindow(_kde_net_wm_blur_rehind_region_atom)));
// 当窗口visual不支持alpha通道时,也等价于不支持窗口背景模糊
hasBlurWindow = hasBlurWindow && getHasWindowAlpha() && hasComposite();
hasBlurWindow = hasBlurWindow && getHasWindowAlpha();

if (m_hasBlurWindow == hasBlurWindow)
return;
Expand Down
6 changes: 2 additions & 4 deletions xcb/utility_x11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,10 +523,8 @@ bool Utility::setEnableBlurWindow(const quint32 WId, bool enable)

bool Utility::blurWindowBackground(const quint32 WId, const QVector<BlurArea> &areas)
{
if (!DXcbWMSupport::instance()->hasBlurWindow() &&
qEnvironmentVariableIsSet("D_DXCB_DISABLE_FORCE_BLUR")) {
return false;
}
if (!DXcbWMSupport::instance()->hasBlurWindow())
return false;

if (DXcbWMSupport::instance()->isDeepinWM()) {
xcb_atom_t atom = DXcbWMSupport::instance()->_net_wm_deepin_blur_region_rounded_atom;
Expand Down

0 comments on commit feb5544

Please sign in to comment.