Skip to content

Commit

Permalink
Free EIS server on disable
Browse files Browse the repository at this point in the history
  • Loading branch information
3l0w committed Sep 30, 2024
1 parent 2c6b694 commit 5e88f55
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/portals/InputCapture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ void CInputCapturePortal::onCreateSession(sdbus::MethodCall& call) {
session->session->onDestroy = [session, this]() {
disable(session->sessionHandle);

session->eis->stopServer();
session->eis = nullptr;
Debug::log(LOG, "[input-capture] Session {} destroyed", session->sessionHandle.c_str());

session->session.release();
Expand Down Expand Up @@ -502,6 +500,9 @@ void CInputCapturePortal::disable(sdbus::ObjectPath sessionHandle) {
if (!session->disable())
return;

session->eis->stopServer();
session->eis.reset();

auto signal = m_pObject->createSignal(INTERFACE_NAME, "Disable");
signal << sessionHandle;

Expand Down

0 comments on commit 5e88f55

Please sign in to comment.