diff options
author | Aqa-Ib <[email protected]> | 2024-10-28 16:52:14 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-10-28 16:52:14 +0000 |
commit | d49a1334a8af7c704626cdf1746cb72415ad6d0d (patch) | |
tree | 7379dad9c9635e34c293e9bc32866c7d80df372c | |
parent | 2c481202effe707451608e272b5a801f8c970052 (diff) | |
download | Hyprland-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.
-rw-r--r-- | src/desktop/Window.cpp | 2 |
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 |