Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
littleblack111 committed Jan 10, 2025
1 parent 8475a8e commit b366748
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/managers/KeybindManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,14 @@ uint64_t CKeybindManager::spawnRawProc(std::string args, PHLWORKSPACE pInitialWo
}

SDispatchResult CKeybindManager::killActive(std::string args) {
kill(g_pCompositor->m_pLastWindow.lock()->getPID(), SIGKILL);
const auto PWINDOW = g_pCompositor->m_pLastWindow.lock();

if (!PWINDOW) {
Debug::log(ERR, "killActive: no window found");
return {.success = false, .error = "killActive: no window found"};
}

kill(PWINDOW->getPID(), SIGKILL);

return {};
}
Expand Down

0 comments on commit b366748

Please sign in to comment.