Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the disable_lockdead_screen option #8427

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/config/ConfigDescriptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,12 @@ inline static const std::vector<SConfigOptionDescription> CONFIG_OPTIONS = {
.type = CONFIG_OPTION_BOOL,
.data = SConfigOptionDescription::SBoolData{false},
},
SConfigOptionDescription{
.value = "misc:disable_lockdead_screen",
.description = "disable the lockdead screen when lockscreen failed.",
.type = CONFIG_OPTION_BOOL,
.data = SConfigOptionDescription::SBoolData{false},
},

/*
* binds:
Expand Down
1 change: 1 addition & 0 deletions src/config/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ CConfigManager::CConfigManager() {
m_pConfig->addConfigValue("misc:middle_click_paste", Hyprlang::INT{1});
m_pConfig->addConfigValue("misc:render_unfocused_fps", Hyprlang::INT{15});
m_pConfig->addConfigValue("misc:disable_xdg_env_checks", Hyprlang::INT{0});
m_pConfig->addConfigValue("misc:disable_lockdead_screen", Hyprlang::INT{0});

m_pConfig->addConfigValue("group:insert_after_current", Hyprlang::INT{1});
m_pConfig->addConfigValue("group:focus_removed_window", Hyprlang::INT{1});
Expand Down
17 changes: 11 additions & 6 deletions src/render/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1042,12 +1042,17 @@ void CHyprRenderer::renderLockscreen(PHLMONITOR pMonitor, timespec* now, const C
TRACY_GPU_ZONE("RenderLockscreen");

if (g_pSessionLockManager->isSessionLocked()) {
Vector2D translate = {geometry.x, geometry.y};
Vector2D translate = {geometry.x, geometry.y};

const auto PSLS = g_pSessionLockManager->getSessionLockSurfaceForMonitor(pMonitor->ID);
if (!PSLS)
renderSessionLockMissing(pMonitor);
else {
const auto PSLS = g_pSessionLockManager->getSessionLockSurfaceForMonitor(pMonitor->ID);
static auto DISABLE_LOCKDEAD_SCREEN = CConfigValue<Hyprlang::INT>("misc:disable_lockdead_screen");

if (!PSLS) {
if (!*DISABLE_LOCKDEAD_SCREEN)
renderSessionLockMissing(pMonitor);
else
Debug::log(WARN, "Lockdead screen shall have been displayed but it is disabled by configuration.");
} else {
renderSessionLockSurface(PSLS, pMonitor, now);
g_pSessionLockManager->onLockscreenRenderedOnMonitor(pMonitor->ID);
}
Expand Down Expand Up @@ -2725,7 +2730,7 @@ bool CHyprRenderer::beginRender(PHLMONITOR pMonitor, CRegion& damage, eRenderMod
return true;
}

/* This is a constant expression, as we always use double-buffering in our swapchain
/* This is a constant expression, as we always use double-buffering in our swapchain
TODO: Rewrite the CDamageRing to take advantage of that maybe? It's made to support longer swapchains atm because we used to do wlroots */
static constexpr const int HL_BUFFER_AGE = 2;

Expand Down
Loading