borderspp: avoid adding multiple borders when reopening windows (#667)

This commit is contained in:
Giacomo Zama
2026-05-16 12:16:29 +02:00
committed by GitHub
parent 90e66baf99
commit f1569efa6a

View File

@ -19,6 +19,9 @@ APICALL EXPORT std::string PLUGIN_API_VERSION() {
}
static void onNewWindow(PHLWINDOW window) {
if (std::ranges::any_of(window->m_windowDecorations, [](const auto& d) { return d->getDisplayName() == "Borders++"; }))
return;
HyprlandAPI::addWindowDecoration(PHANDLE, window, makeUnique<CBordersPlusPlus>(window));
}