From 6f3b004199a6b1bb0a8f5431d677ab926bdf19f3 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 3 Jun 2022 17:41:57 +0200 Subject: IPC and log changes, introduce signature --- src/managers/EventManager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/managers/EventManager.cpp') diff --git a/src/managers/EventManager.cpp b/src/managers/EventManager.cpp index a8bde442..eed0e6e5 100644 --- a/src/managers/EventManager.cpp +++ b/src/managers/EventManager.cpp @@ -1,4 +1,5 @@ #include "EventManager.hpp" +#include "../Compositor.hpp" #include #include @@ -26,10 +27,9 @@ void CEventManager::startThread() { return; } - unlink("/tmp/hypr/.socket2.sock"); - sockaddr_un SERVERADDRESS = {.sun_family = AF_UNIX}; - strcpy(SERVERADDRESS.sun_path, "/tmp/hypr/.socket2.sock"); + std::string socketPath = "/tmp/hypr/" + g_pCompositor->m_szInstanceSignature + "/.socket2.sock"; + strcpy(SERVERADDRESS.sun_path, socketPath.c_str()); bind(SOCKET, (sockaddr*)&SERVERADDRESS, SUN_LEN(&SERVERADDRESS)); @@ -41,7 +41,7 @@ void CEventManager::startThread() { sockaddr_in clientAddress; socklen_t clientSize = sizeof(clientAddress); - Debug::log(LOG, "Hypr socket 2 started."); + Debug::log(LOG, "Hypr socket 2 started at %s", socketPath.c_str()); // set the socket nonblock int flags = fcntl(SOCKET, F_GETFL, 0); -- cgit v1.2.3