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.
This commit is contained in:
Maximilian Seidler 2024-03-15 14:48:11 +01:00
parent 90c313488d
commit adfeb543ad

View file

@ -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;
}