mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-11-16 23:05:58 +01:00
parent
7ca13a801b
commit
57ce4f759c
2 changed files with 8 additions and 3 deletions
|
@ -37,6 +37,7 @@ void CConfigManager::init() {
|
||||||
m_config.addConfigValue("general:disable_loading_bar", Hyprlang::INT{0});
|
m_config.addConfigValue("general:disable_loading_bar", Hyprlang::INT{0});
|
||||||
m_config.addConfigValue("general:hide_cursor", Hyprlang::INT{0});
|
m_config.addConfigValue("general:hide_cursor", Hyprlang::INT{0});
|
||||||
m_config.addConfigValue("general:grace", Hyprlang::INT{0});
|
m_config.addConfigValue("general:grace", Hyprlang::INT{0});
|
||||||
|
m_config.addConfigValue("general:no_fade_in", Hyprlang::INT{0});
|
||||||
|
|
||||||
m_config.addSpecialCategory("background", Hyprlang::SSpecialCategoryOptions{.key = nullptr, .anonymousKeyBased = true});
|
m_config.addSpecialCategory("background", Hyprlang::SSpecialCategoryOptions{.key = nullptr, .anonymousKeyBased = true});
|
||||||
m_config.addSpecialConfigValue("background", "monitor", Hyprlang::STRING{""});
|
m_config.addSpecialConfigValue("background", "monitor", Hyprlang::STRING{""});
|
||||||
|
|
|
@ -157,6 +157,7 @@ static int frames = 0;
|
||||||
//
|
//
|
||||||
CRenderer::SRenderFeedback CRenderer::renderLock(const CSessionLockSurface& surf) {
|
CRenderer::SRenderFeedback CRenderer::renderLock(const CSessionLockSurface& surf) {
|
||||||
static auto* const PDISABLEBAR = (Hyprlang::INT* const*)g_pConfigManager->getValuePtr("general:disable_loading_bar");
|
static auto* const PDISABLEBAR = (Hyprlang::INT* const*)g_pConfigManager->getValuePtr("general:disable_loading_bar");
|
||||||
|
static auto* const PNOFADEIN = (Hyprlang::INT* const*)g_pConfigManager->getValuePtr("general:no_fade_in");
|
||||||
|
|
||||||
matrixProjection(projection.data(), surf.size.x, surf.size.y, WL_OUTPUT_TRANSFORM_NORMAL);
|
matrixProjection(projection.data(), surf.size.x, surf.size.y, WL_OUTPUT_TRANSFORM_NORMAL);
|
||||||
|
|
||||||
|
@ -171,7 +172,7 @@ CRenderer::SRenderFeedback CRenderer::renderLock(const CSessionLockSurface& surf
|
||||||
|
|
||||||
SRenderFeedback feedback;
|
SRenderFeedback feedback;
|
||||||
|
|
||||||
const float bga = asyncResourceGatherer->applied ?
|
float bga = asyncResourceGatherer->applied ?
|
||||||
std::clamp(std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now() - gatheredAt).count() / 500000.0, 0.0, 1.0) :
|
std::clamp(std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now() - gatheredAt).count() / 500000.0, 0.0, 1.0) :
|
||||||
0.0;
|
0.0;
|
||||||
|
|
||||||
|
@ -188,6 +189,9 @@ CRenderer::SRenderFeedback CRenderer::renderLock(const CSessionLockSurface& surf
|
||||||
gatheredAt = std::chrono::system_clock::now();
|
gatheredAt = std::chrono::system_clock::now();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (**PNOFADEIN)
|
||||||
|
bga = 1.0;
|
||||||
|
|
||||||
// render widgets
|
// render widgets
|
||||||
const auto WIDGETS = getOrCreateWidgetsFor(&surf);
|
const auto WIDGETS = getOrCreateWidgetsFor(&surf);
|
||||||
for (auto& w : *WIDGETS) {
|
for (auto& w : *WIDGETS) {
|
||||||
|
|
Loading…
Reference in a new issue