config/legacy: translate default window args properly

fixes some dispatchers
This commit is contained in:
Vaxry 2026-04-26 23:18:26 +01:00
parent 0e64d9e2b6
commit 99a6c5f2e2
No known key found for this signature in database

View file

@ -39,9 +39,9 @@ static SDispatchResult wrap(ActionResult res) {
}
// helper: resolve window from regex string, or focused if empty/active
static PHLWINDOW windowFromArg(const std::string& arg) {
static std::optional<PHLWINDOW> windowFromArg(const std::string& arg) {
if (arg.empty() || arg == "active")
return nullptr; // will use xtract(nullopt) -> focused window
return std::nullopt; // will use xtract(nullopt) -> focused window
return g_pCompositor->getWindowByRegex(arg);
}