diff options
author | vaxerski <[email protected]> | 2022-06-24 22:28:54 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-06-24 22:28:54 +0200 |
commit | 45a44f969048d232939c6931fe7ab15cf0e85b87 (patch) | |
tree | 00af29b7425c4f96342c2a6caac46c58b6b3981e | |
parent | e95e01416e9431c7fbfb164746b194594062da9c (diff) | |
download | Hyprland-45a44f969048d232939c6931fe7ab15cf0e85b87.tar.gz Hyprland-45a44f969048d232939c6931fe7ab15cf0e85b87.zip |
added noblur
-rw-r--r-- | src/Window.hpp | 3 | ||||
-rw-r--r-- | src/config/ConfigManager.cpp | 3 | ||||
-rw-r--r-- | src/events/Windows.cpp | 2 | ||||
-rw-r--r-- | src/managers/input/Tablets.cpp | 2 | ||||
-rw-r--r-- | src/render/OpenGL.cpp | 2 |
5 files changed, 8 insertions, 4 deletions
diff --git a/src/Window.hpp b/src/Window.hpp index 06140303..9f92432a 100644 --- a/src/Window.hpp +++ b/src/Window.hpp @@ -15,6 +15,7 @@ struct SWindowSpecialRenderData { struct SWindowAdditionalConfigData { std::string animationStyle = ""; int rounding = -1; // -1 means no + bool forceNoBlur = false; }; class CWindow { @@ -110,4 +111,4 @@ public: wlr_box getFullWindowBoundingBox(); wlr_box getWindowIdealBoundingBoxIgnoreReserved(); -};
\ No newline at end of file +}; diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index c3621847..711ce04c 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -481,7 +481,8 @@ void CConfigManager::handleWindowRule(const std::string& command, const std::str && RULE.find("size") != 0 && RULE.find("pseudo") != 0 && RULE.find("monitor") != 0 - && RULE.find("nofocus") != 0 + && RULE != "nofocus" + && RULE != "noblur" && RULE.find("animation") != 0 && RULE.find("rounding") != 0 && RULE.find("workspace") != 0) { diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 48571892..ed932eae 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -127,6 +127,8 @@ void Events::listener_mapWindow(void* owner, void* data) { PWINDOW->m_bIsPseudotiled = true; } else if (r.szRule.find("nofocus") == 0) { PWINDOW->m_bNoFocus = true; + } else if (r.szRule == "noblur") { + PWINDOW->m_sAdditionalConfigData.forceNoBlur = true; } else if (r.szRule.find("rounding") == 0) { try { PWINDOW->m_sAdditionalConfigData.rounding = std::stoi(r.szRule.substr(r.szRule.find_first_of(' ') + 1)); diff --git a/src/managers/input/Tablets.cpp b/src/managers/input/Tablets.cpp index c33f021c..4285d06b 100644 --- a/src/managers/input/Tablets.cpp +++ b/src/managers/input/Tablets.cpp @@ -226,4 +226,4 @@ void CInputManager::focusTablet(STablet* pTab, wlr_tablet_tool* pTool, bool moti if (PTOOL->pSurface) wlr_tablet_v2_tablet_tool_notify_proximity_out(PTOOL->wlrTabletToolV2); } -}
\ No newline at end of file +} diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 85dd29be..92c9d9c9 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -566,7 +566,7 @@ void CHyprOpenGLImpl::renderTextureWithBlur(const CTexture& tex, wlr_box* pBox, static auto *const PBLURENABLED = &g_pConfigManager->getConfigValuePtr("decoration:blur")->intValue; static auto* const PNOBLUROVERSIZED = &g_pConfigManager->getConfigValuePtr("decoration:no_blur_on_oversized")->intValue; - if (*PBLURENABLED == 0 || (*PNOBLUROVERSIZED && m_RenderData.primarySurfaceUVTopLeft != Vector2D(-1, -1))) { + if (*PBLURENABLED == 0 || (*PNOBLUROVERSIZED && m_RenderData.primarySurfaceUVTopLeft != Vector2D(-1, -1)) || (m_pCurrentWindow && m_pCurrentWindow->m_sAdditionalConfigData.forceNoBlur)) { renderTexture(tex, pBox, a, round, false, border, true); return; } |