Allow empty args in hyprctl dispatch (#2724)

This commit is contained in:
MightyPlaza
2023-07-16 19:01:06 +00:00
committed by GitHub
parent cacdb424a9
commit ddb8c89776

View File

@@ -686,8 +686,11 @@ std::string dispatchRequest(std::string in) {
in = in.substr(in.find_first_of(' ') + 1); in = in.substr(in.find_first_of(' ') + 1);
const auto DISPATCHSTR = in.substr(0, in.find_first_of(' ')); const auto DISPATCHSTR = in.substr(0, in.find_first_of(' '));
auto DISPATCHARG = std::string();
if ((int) in.find_first_of(' ') != -1)
DISPATCHARG = in.substr(in.find_first_of(' ') + 1);
const auto DISPATCHARG = in.substr(in.find_first_of(' ') + 1);
const auto DISPATCHER = g_pKeybindManager->m_mDispatchers.find(DISPATCHSTR); const auto DISPATCHER = g_pKeybindManager->m_mDispatchers.find(DISPATCHSTR);
if (DISPATCHER == g_pKeybindManager->m_mDispatchers.end()) if (DISPATCHER == g_pKeybindManager->m_mDispatchers.end())