aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAqa-Ib <[email protected]>2024-10-28 16:52:14 +0000
committerGitHub <[email protected]>2024-10-28 16:52:14 +0000
commitd49a1334a8af7c704626cdf1746cb72415ad6d0d (patch)
tree7379dad9c9635e34c293e9bc32866c7d80df372c /src
parent2c481202effe707451608e272b5a801f8c970052 (diff)
downloadHyprland-d49a1334a8af7c704626cdf1746cb72415ad6d0d.tar.gz
Hyprland-d49a1334a8af7c704626cdf1746cb72415ad6d0d.zip
swallow: check if swallow_regex doesn't exist (#8265)
Avoid to run CWindow::getSwallower() when `swallow_regex` doesn't exist in the user's config file.
Diffstat (limited to 'src')
-rw-r--r--src/desktop/Window.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp
index e4f987eb..60f3b79d 100644
--- a/src/desktop/Window.cpp
+++ b/src/desktop/Window.cpp
@@ -1535,7 +1535,7 @@ PHLWINDOW CWindow::getSwallower() {
static auto PSWALLOWEXREGEX = CConfigValue<std::string>("misc:swallow_exception_regex");
static auto PSWALLOW = CConfigValue<Hyprlang::INT>("misc:enable_swallow");
- if (!*PSWALLOW || (*PSWALLOWREGEX).empty())
+ if (!*PSWALLOW || std::string{*PSWALLOWREGEX} == STRVAL_EMPTY || (*PSWALLOWREGEX).empty())
return nullptr;
// check parent