From 6698e92f6d7574a31a6d0e17acf63edf9f689102 Mon Sep 17 00:00:00 2001 From: BossCode45 Date: Sun, 11 May 2025 18:17:27 +1200 Subject: feat: A few minor bug fixes Fixed keybinding errors Hopefully fixed multiple monitor status bar workspaces Refactored EWMH module --- src/IPC.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/IPC.cpp') diff --git a/src/IPC.cpp b/src/IPC.cpp index 3ed1bb6..4f9754e 100644 --- a/src/IPC.cpp +++ b/src/IPC.cpp @@ -12,13 +12,16 @@ using std::cout, std::endl; static const char* path = "/tmp/YATwm.sock"; -IPCServerModule::IPCServerModule(CommandsModule& commandsModule, Config& cfg, Globals& globals) - :commandsModule(commandsModule), - cfg(cfg), - globals(globals) +IPCServerModule::IPCServerModule(Globals& globals, Config& cfg, CommandsModule& commandsModule, EWMHModule& ewmh) + :globals(globals) + ,cfg(cfg) + ,commandsModule(commandsModule) + ,ewmh(ewmh) { } + + void IPCServerModule::init() { sockfd = socket(AF_UNIX, SOCK_STREAM, 0); @@ -32,7 +35,7 @@ void IPCServerModule::init() cout << "ERROR " << errno << endl; } cout << "SOCKETED" << endl; - setIPCPath((unsigned char*)path, strlen(path)); + ewmh.setIPCPath((unsigned char*)path, strlen(path)); ready = true; } @@ -85,10 +88,10 @@ void IPCServerModule::quitIPC() int IPCServerModule::getFD() { if(!ready) - return -1; + return 0; if(sockfd > 0) return sockfd; - return -1; + return 0; } IPCClientModule::IPCClientModule() -- cgit v1.2.3