Skip to content

Commit

Permalink
fix: blur region atom not set if blur unload
Browse files Browse the repository at this point in the history
always set blur region if `D_DXCB_DISABLE_FORCE_BLUR` env not set

Issue: linuxdeepin/developer-center#7057
  • Loading branch information
kegechen committed Jan 25, 2024
1 parent f3a7223 commit 1747949
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion xcb/dnotitlebarwindowhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,8 @@ bool DNoTitlebarWindowHelper::updateWindowBlurAreasForWM()
if (!blurEnable || !DWMSupport::instance()->hasBlurWindow()) {
Utility::clearWindowBlur(m_windowID);

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

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

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

Please sign in to comment.