From adfeb543ad38805e165ee67c9ae2bcd29c1d6d9f Mon Sep 17 00:00:00 2001 From: Maximilian Seidler Date: Fri, 15 Mar 2024 14:48:11 +0100 Subject: [PATCH] core: allow fade out for other compositors Works fine in sway altough it fades to a black screen not to the desktop. Still looks kinda good. --- src/core/hyprlock.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/hyprlock.cpp b/src/core/hyprlock.cpp index 046e621..0b36573 100644 --- a/src/core/hyprlock.cpp +++ b/src/core/hyprlock.cpp @@ -531,11 +531,9 @@ void CHyprlock::run() { } void CHyprlock::unlock() { - static auto* const PNOFADEOUT = (Hyprlang::INT* const*)g_pConfigManager->getValuePtr("general:no_fade_out"); - const auto CURRENTDESKTOP = getenv("XDG_CURRENT_DESKTOP"); - const auto SZCURRENTD = std::string{CURRENTDESKTOP ? CURRENTDESKTOP : ""}; + static auto* const PNOFADEOUT = (Hyprlang::INT* const*)g_pConfigManager->getValuePtr("general:no_fade_out"); - if (**PNOFADEOUT || SZCURRENTD != "Hyprland") { + if (**PNOFADEOUT) { unlockSession(); return; }