hyprbars: don't respond to input on disabled bars

fixes #362
This commit is contained in:
Vaxry 2025-05-25 22:46:48 +02:00
parent 1e57d4e54d
commit a2157f8da7
No known key found for this signature in database
GPG Key ID: 665806380871D640

View File

@ -78,6 +78,11 @@ std::string CHyprBar::getDisplayName() {
}
bool CHyprBar::inputIsValid() {
static auto* const PENABLED = (Hyprlang::INT* const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:hyprbars:enabled")->getDataStaticPtr();
if (!**PENABLED)
return false;
if (!m_pWindow->m_workspace || !m_pWindow->m_workspace->isVisible() || !g_pInputManager->m_exclusiveLSes.empty() ||
(g_pSeatManager->m_seatGrab && !g_pSeatManager->m_seatGrab->accepts(m_pWindow->m_wlSurface->resource())))
return false;