mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-06 23:21:57 -07:00
added blur_xray
This commit is contained in:
@@ -77,6 +77,7 @@ void CConfigManager::setDefaultVars() {
|
|||||||
configValues["decoration:blur_passes"].intValue = 1;
|
configValues["decoration:blur_passes"].intValue = 1;
|
||||||
configValues["decoration:blur_ignore_opacity"].intValue = 0;
|
configValues["decoration:blur_ignore_opacity"].intValue = 0;
|
||||||
configValues["decoration:blur_new_optimizations"].intValue = 1;
|
configValues["decoration:blur_new_optimizations"].intValue = 1;
|
||||||
|
configValues["decoration:blur_xray"].intValue = 0;
|
||||||
configValues["decoration:active_opacity"].floatValue = 1;
|
configValues["decoration:active_opacity"].floatValue = 1;
|
||||||
configValues["decoration:inactive_opacity"].floatValue = 1;
|
configValues["decoration:inactive_opacity"].floatValue = 1;
|
||||||
configValues["decoration:fullscreen_opacity"].floatValue = 1;
|
configValues["decoration:fullscreen_opacity"].floatValue = 1;
|
||||||
|
@@ -715,6 +715,7 @@ void CHyprOpenGLImpl::markBlurDirtyForMonitor(CMonitor* pMonitor) {
|
|||||||
|
|
||||||
void CHyprOpenGLImpl::preRender(CMonitor* pMonitor) {
|
void CHyprOpenGLImpl::preRender(CMonitor* pMonitor) {
|
||||||
static auto *const PBLURNEWOPTIMIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur_new_optimizations")->intValue;
|
static auto *const PBLURNEWOPTIMIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur_new_optimizations")->intValue;
|
||||||
|
static auto *const PBLURXRAY = &g_pConfigManager->getConfigValuePtr("decoration:blur_xray")->intValue;
|
||||||
static auto *const PBLUR = &g_pConfigManager->getConfigValuePtr("decoration:blur")->intValue;
|
static auto *const PBLUR = &g_pConfigManager->getConfigValuePtr("decoration:blur")->intValue;
|
||||||
|
|
||||||
if (!*PBLURNEWOPTIMIZE || !m_mMonitorRenderResources[pMonitor].blurFBDirty || !*PBLUR)
|
if (!*PBLURNEWOPTIMIZE || !m_mMonitorRenderResources[pMonitor].blurFBDirty || !*PBLUR)
|
||||||
@@ -723,7 +724,7 @@ void CHyprOpenGLImpl::preRender(CMonitor* pMonitor) {
|
|||||||
bool has = false;
|
bool has = false;
|
||||||
|
|
||||||
for (auto& w : g_pCompositor->m_vWindows) {
|
for (auto& w : g_pCompositor->m_vWindows) {
|
||||||
if (w->m_iWorkspaceID == pMonitor->activeWorkspace && w->m_bIsMapped && !w->isHidden() && !w->m_bIsFloating) {
|
if (w->m_iWorkspaceID == pMonitor->activeWorkspace && w->m_bIsMapped && !w->isHidden() && (!w->m_bIsFloating || *PBLURXRAY)) {
|
||||||
has = true;
|
has = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -760,6 +761,7 @@ void CHyprOpenGLImpl::preBlurForCurrentMonitor() {
|
|||||||
|
|
||||||
void CHyprOpenGLImpl::preWindowPass() {
|
void CHyprOpenGLImpl::preWindowPass() {
|
||||||
static auto *const PBLURNEWOPTIMIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur_new_optimizations")->intValue;
|
static auto *const PBLURNEWOPTIMIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur_new_optimizations")->intValue;
|
||||||
|
static auto *const PBLURXRAY = &g_pConfigManager->getConfigValuePtr("decoration:blur_xray")->intValue;
|
||||||
static auto *const PBLUR = &g_pConfigManager->getConfigValuePtr("decoration:blur")->intValue;
|
static auto *const PBLUR = &g_pConfigManager->getConfigValuePtr("decoration:blur")->intValue;
|
||||||
|
|
||||||
if (!m_RenderData.pCurrentMonData->blurFBDirty || !*PBLURNEWOPTIMIZE || !*PBLUR)
|
if (!m_RenderData.pCurrentMonData->blurFBDirty || !*PBLURNEWOPTIMIZE || !*PBLUR)
|
||||||
@@ -801,7 +803,7 @@ void CHyprOpenGLImpl::preWindowPass() {
|
|||||||
|
|
||||||
bool hasWindows = false;
|
bool hasWindows = false;
|
||||||
for (auto& w : g_pCompositor->m_vWindows) {
|
for (auto& w : g_pCompositor->m_vWindows) {
|
||||||
if (w->m_iWorkspaceID == m_RenderData.pMonitor->activeWorkspace && !w->isHidden() && w->m_bIsMapped && !w->m_bIsFloating) {
|
if (w->m_iWorkspaceID == m_RenderData.pMonitor->activeWorkspace && !w->isHidden() && w->m_bIsMapped && (!w->m_bIsFloating || *PBLURXRAY)) {
|
||||||
|
|
||||||
// check if window is valid
|
// check if window is valid
|
||||||
if (!windowShouldBeBlurred(w.get()))
|
if (!windowShouldBeBlurred(w.get()))
|
||||||
@@ -825,6 +827,7 @@ void CHyprOpenGLImpl::renderTextureWithBlur(const CTexture& tex, wlr_box* pBox,
|
|||||||
static auto *const PBLURENABLED = &g_pConfigManager->getConfigValuePtr("decoration:blur")->intValue;
|
static auto *const PBLURENABLED = &g_pConfigManager->getConfigValuePtr("decoration:blur")->intValue;
|
||||||
static auto *const PNOBLUROVERSIZED = &g_pConfigManager->getConfigValuePtr("decoration:no_blur_on_oversized")->intValue;
|
static auto *const PNOBLUROVERSIZED = &g_pConfigManager->getConfigValuePtr("decoration:no_blur_on_oversized")->intValue;
|
||||||
static auto *const PBLURNEWOPTIMIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur_new_optimizations")->intValue;
|
static auto *const PBLURNEWOPTIMIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur_new_optimizations")->intValue;
|
||||||
|
static auto *const PBLURXRAY = &g_pConfigManager->getConfigValuePtr("decoration:blur_xray")->intValue;
|
||||||
|
|
||||||
// make a damage region for this window
|
// make a damage region for this window
|
||||||
pixman_region32_t damage;
|
pixman_region32_t damage;
|
||||||
@@ -858,7 +861,7 @@ void CHyprOpenGLImpl::renderTextureWithBlur(const CTexture& tex, wlr_box* pBox,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// vvv TODO: layered blur fbs?
|
// vvv TODO: layered blur fbs?
|
||||||
const bool USENEWOPTIMIZE = (*PBLURNEWOPTIMIZE && m_pCurrentWindow && !m_pCurrentWindow->m_bIsFloating && m_RenderData.pCurrentMonData->blurFB.m_cTex.m_iTexID && !g_pCompositor->isWorkspaceSpecial(m_pCurrentWindow->m_iWorkspaceID));
|
const bool USENEWOPTIMIZE = (*PBLURNEWOPTIMIZE && m_pCurrentWindow && (!m_pCurrentWindow->m_bIsFloating || *PBLURXRAY) && m_RenderData.pCurrentMonData->blurFB.m_cTex.m_iTexID && !g_pCompositor->isWorkspaceSpecial(m_pCurrentWindow->m_iWorkspaceID));
|
||||||
|
|
||||||
CFramebuffer* POUTFB = nullptr;
|
CFramebuffer* POUTFB = nullptr;
|
||||||
if (!USENEWOPTIMIZE) {
|
if (!USENEWOPTIMIZE) {
|
||||||
|
Reference in New Issue
Block a user