summaryrefslogtreecommitdiff
path: root/src/IPC.cpp
diff options
context:
space:
mode:
authorBossCode45 <boss@tehbox.org>2025-05-11 18:17:27 +1200
committerBossCode45 <boss@tehbox.org>2025-06-08 23:29:33 +1200
commit6698e92f6d7574a31a6d0e17acf63edf9f689102 (patch)
tree96dec36f65651889a5f6ee80bb917b5bfc0f2bc3 /src/IPC.cpp
parent7dd44834f0af18cca87786a2050ae69928b7a397 (diff)
downloadYATwm-6698e92f6d7574a31a6d0e17acf63edf9f689102.tar.gz
YATwm-6698e92f6d7574a31a6d0e17acf63edf9f689102.zip
feat: A few minor bug fixesv0.0.2main
Fixed keybinding errors Hopefully fixed multiple monitor status bar workspaces Refactored EWMH module
Diffstat (limited to 'src/IPC.cpp')
-rw-r--r--src/IPC.cpp17
1 files changed, 10 insertions, 7 deletions
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()